光阴似箭催人老,日月如移越少年。
Thanks for the invitation production Do not leave spaces
production
"start": "set NODE_ENV=production&& npm run build && node babel/server",
Just look at the output
console.log(`+${env}+`, env === "production");
declare -x NODE_ENV=production && node temp.js
Passed the test myself
If it does not pass, use typeof env to print out the type and have a look. It may be object
typeof env
Change the set in the command to export
export NODE_ENV=production
You used the set command to bring spaces into environment variables
Thanks for the invitation
production
Do not leave spacesJust look at the output
Passed the test myself
If it does not pass, use
typeof env
to print out the type and have a look. It may be objectChange the set in the command to export
You used the set command to bring spaces into environment variables