electron-userland / electron-userland/electron-webpack
How to run development mode with `production` settings?
- Dominant language
- TypeScript
- Stars
- 902
- Forks
- 168
- PR merge metrics
- No merged PRs in 30d
Description
Normally this is easy with plain Webpack, but if I run `NODE_ENV=production electron-webpack dev`, my code's `console.log(process.env.NODE_ENV)` still shows `"development"`.
My `webpack.config.js` file does log `"production"`, so I think it might be compiling in production mode, but if the runtime shows `"development"` then runtime libs like `react-hot-loader` won't see the correct env var.
How can we make the runtime env var be correct? Why doesn't `electron-webpack` respect my `NODE_ENV` setting and set `process.env.NODE_ENV` appropriately?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.