Setting NODE_ENV=production
causes these libraries and tools to behave as follows:
npm:
install
will not install devDependenciesshrinkwrap
will not install devDependenciesprune
will 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:
production
doesn't do anything, but setting todevelopment
enables 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: