egoist / vuepack

:package: A modern starter which uses Vue 2, Vuex, Vue-router and Webpack 2 (and even Electron)
http://vuepack.surge.sh
MIT License
2.43k stars 202 forks source link

Webpack Define Plugin is not working #126

Closed BojDom closed 7 years ago

BojDom commented 7 years ago

If you clone your repo everything is working except that i can't pass to the client.js some variables. If you make npm run build and view the source of the client.js file you will not find the process.env.NODE_ENV variable for example... please fix this issue

egoist commented 7 years ago

Just tried, it's actually working for me... sure you can't find process.env.NODE_ENV because it's replaced with "production"

BojDom commented 7 years ago

I just realized that the define plugin is just a text replacer... so it does not fill variables in an object, i must call that variable with the exact string added in the define plugin