vue-cli配置了pages对象
const files = fs.readdirSync('./src/pages')
files.forEach(n => {
pages[n] = {
entry: `./src/pages/${n}/main.js`, // page 的入口
template: './src/public/index.html', // 模板来源
filename: 'index.html', // 在 dist/index.html 的输出
favicon: './src/public/favicon.ico',
title: '首页',
chunks: ['chunk-vendors', 'chunk-common', n]
}
})
然后装了@vue/cli-plugin-eslint
import 资源会引起报错
Resolve error: TypeError: Cannot destructure property 'entry' of 'pageConfig' as it is undefined.
at D:\git\frontend\node\_modules\@vue\cli-service\lib\config\app.js:198:11
at Array.forEach (<anonymous>)
at D:\git\frontend\node\_modules\@vue\cli-service\lib\config\app.js:195:13
at D:\git\frontend\node\_modules\@vue\cli-service\lib\Service.js:251:40
at Array.forEach (<anonymous>)
at Service.resolveChainableWebpackConfig (D:\git\frontend\node\_modules\@vue\cli-service\lib\Service.js:251:26)
at Service.resolveWebpackConfig (D:\git\frontend\node\_modules\@vue\cli-service\lib\Service.js:255:48)
at Object.<anonymous> (D:\git\frontend\node\_modules\@vue\cli-service\webpack.config.js:12:26)
at Module.\_compile (internal/modules/cjs/loader.js:880:30)
at Object.Module.\_extensions..js (internal/modules/cjs/loader.js:892:10)eslint(import/no-duplicates)
pageConfig 是什么东西?没有搜索到有关的问题.望大佬解答
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…