Bug report
What is the current behavior?
Setting mode option to none
replaces process.env.NODE_ENV
to string none
in the bundled source code. So in every case (none, development, production) the bundled output will not have process.env.NODE_ENV
anywhere but will have replaced strings. What is the reasoning behind this? Why can’t I proceed with NODE_ENV
variable and resolve within my applications logic
If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
Setting option to none
should not replace the process.env.NODE_ENV
Other relevant information:
webpack version: 4.10.2
Node.js version: 8.10
Operating System:
Additional tools:
You can prevent this using the following config:
This has been fixed in
next
branch (#7611). It will be the default behavior in webpack@5.