Mode option always overrides NODE_ENV at compile time. Why?

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:

Author: Fantashit

2 thoughts on “Mode option always overrides NODE_ENV at compile time. Why?

Comments are closed.