-
-
Notifications
You must be signed in to change notification settings - Fork 667
NODE_ENV not set on process.env #2362
Copy link
Copy link
Closed
Description
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Currently, mode only sets the value for NODE_ENV in the DefinePlugin but not changes the process.env.NODE_ENV.
For example, Babel depends on this env variable and when used with webpack --mode=production it will still run in development mode.
If the current behavior is a bug, please provide the steps to reproduce.
Running webpack --silent --mode=production && echo $NODE_ENV
This will NOT print anything.
Run NODE_ENV=production && webpack --silent --mode=production && echo $NODE_ENV
This will print production
What is the expected behavior?
Running webpack --silent --mode=production && echo $NODE_ENV should print production
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels