Setting NODE_ENV=production causes these libraries and tools to behave as follows:
npm:
installwill not install devDependenciesshrinkwrapwill not install devDependenciesprunewill remove devDependencies
yarn:
express:
- caches CSS files generated from CSS extensions
- generates less verbose error messages
- caches view templates by default
- sets the 'env' app setting to 'production' (the value of NODE_ENV)
express-session:
pug:
react:
vue:
sails:
loopback:
i18next:
ghost:
bluebird:
productiondoesn't do anything, but setting todevelopmentenables long stack traces and warnings
finalhandler (used by express):
These tools use NODE_ENV for selecting an environment/config:
These might use NODE_ENV sometime in the future:
- angular (offline compilation)
Related resources: