CityRay opened this issue 7 years ago · 0 comments
npm install --save-dev cross-env
{ "scripts": { "prod": "cross-env Version=1.0.1.1 node prod.js" } }
在 prod.js 中就能抓取到 'Version' 值
console.log(process.env.Version);
Reference