在使用electron-vue时候,运行npn run dev,会出现下面的错误


解决
没有搜索到合适的答案,在GitHub的electron-vue issue中找到了
方案一
简单粗暴,不知道会不会有什么影响,直接将这段代码去掉

根据别人在issue里面的写法,.electron-vue/webpack.web.config.js 和.electron-vue/webpack.renderer.config.js中的

改为
new HtmlWebpackPlugin({ filename: 'index.html', template: path.resolve(__dirname, '../src/index.ejs'), templateParameters(compilation, assets, options) { return { compilation: compilation, webpack: compilation.getStats().toJson(), webpackConfig: compilation.options, htmlWebpackPlugin: { files: assets, options: options }, process, }; }, minify: { collapseWhitespace: true, removeAttributeQuotes: true, removeComments: true }, nodeModules: false }),
部分素材资源来源网站,本站提供免费下载,如有侵权请联系站长马上删除!