NODE_ENV
works like any other environment variable (e.g. PATH) and it depends on your platform how to set it:
- Linux and OSX use the simple format
NODE_ENV=production
- Windows uses the
SET NODE_ENV=production
You can explicitly set it before starting your npm run
script by prepending the previous format:
package.json
{