process.env.production code example
Example 1: set node process production
{
...
"scripts": {
"start": "NODE_ENV=production node ./app"
}
...
}
Example 2: set node process production
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': '"production"',
})
]
Example 3: process.env.production
export NODE_ENV=production
# Or if you are in windows you could try this:
SET NODE_ENV=production