SimulatedGREG / electron-vue

An Electron & Vue.js quick start boilerplate with vue-cli scaffolding, common Vue plugins, electron-packager/electron-builder, unit/e2e testing, vue-devtools, and webpack.
https://simulatedgreg.gitbooks.io/electron-vue/content/
MIT License
15.47k stars 1.54k forks source link

the process.env.NODE_ENV is undefined in npm run dev #1008

Open TOUGHOU opened 4 years ago

TOUGHOU commented 4 years ago

Found an issue or bug with electron-vue? Tell me all about it!

Questions regarding how to use electron or vue are likely to be closed as they are not direct issues with this boilerplate. Please seek solutions from official documentation or their respective communities.

Describe the issue / bug.

# the process.env.NODE_ENV is undefined when i npm run build.

How can I reproduce this problem?

# electron-vue cli webpack.DefinePlugin also not work when npm run dev.

If visual, provide a screenshot.

# electron

Tell me about your development environment.
loama commented 4 years ago

Also happening in MacOS, any fixes?

loama commented 4 years ago

https://auth0.com/blog/electron-tutorial-building-modern-desktop-apps-with-vue-js/ here is a good guide for anyone facing this issue

TOUGHOU commented 4 years ago

https://auth0.com/blog/electron-tutorial-building-modern-desktop-apps-with-vue-js/ here is a good guide for anyone facing this issue

Do u fixed it?

loama commented 4 years ago

Yeah it works @FJHou, I just didn’t make a PR because I am totally uncertain if that breaks other things.