Answer the question
In order to leave comments, you need to log in
How to set NODE_ENV?
How to correctly set NODE_ENV in the script described in the file package.json
?
...
"scripts": {
"build": "NODE_ENV=production webpack --config ./webpack.prod.config.js --progress --colors",
"start": "node ./app.js"
},
...
npm run build
, but it gives me that"NODE_ENV" не является внутренней или внешней
командой, исполняемой программой или пакетным файлом.
Answer the question
In order to leave comments, you need to log in
// Linux
...
"scripts": {
"build": "export NODE_ENV=production webpack --config ./webpack.prod.config.js --progress --colors",
"start": "node ./app.js"
},
...
// Windows
...
"scripts": {
"build": "set NODE_ENV=production webpack --config ./webpack.prod.config.js --progress --colors",
"start": "node ./app.js"
},
...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question