Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run dev失败了 #6

Open
Undo101 opened this issue Mar 13, 2020 · 2 comments
Open

run dev失败了 #6

Undo101 opened this issue Mar 13, 2020 · 2 comments

Comments

@Undo101
Copy link

Undo101 commented Mar 13, 2020

image
是不能在mac上运行吗?

@c10342
Copy link
Owner

c10342 commented Mar 17, 2020

你好,出现这种情况是因为nodejs版本太高,并不是不能再mac上运行,解决的方案有2种
1、把nodejs降级为nodejs11
2、修改.electron-vue/webpack.web.config.js和.electron-vue/webpack.renderer.config.js文件的HtmlWebpackPlugin,添加templateParameters,修改后如下:
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
})

@Undo101
Copy link
Author

Undo101 commented Mar 18, 2020

确实可以 感谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants