npm production code example
Example 1: npm install production
npm install --production
Example 2: how to install as dev dependency
npm install <package-name> --save-dev
Example 3: npm start for production
{
"scripts": {
"start": "NODE_ENV=development REACT_SERVER_CONFIGS=_configs/development/ react-server start",
"start-beta": "NODE_ENV=beta REACT_SERVER_CONFIGS=_configs/beta/ react-server start",
"start-prod": "NODE_ENV=production REACT_SERVER_CONFIGS=_configs/production/ react-server start"
}
}