windows

set NODE_ENV=production

"scripts": {
    "release": "set NODE_ENV=production && gulp rtm",
    "dev": "set NODE_ENV=development && gulp watch",
}

linux & mac

export NODE_ENV=production

"scripts": {
    "release": "NODE_ENV=production gulp rtm",
    "dev": "NODE_ENV=development gulp watch",
}

cross-env跨平台设置

npm i cross-env -D

"scripts": {
    "release": "cross-env NODE_ENV=production gulp rtm",
    "dev": "cross-env NODE_ENV=development gulp watch",
}

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-06
  • 2022-12-23
  • 2021-12-05
  • 2021-11-12
  • 2021-11-02
猜你喜欢
  • 2021-08-07
  • 2022-12-23
  • 2021-11-28
  • 2022-12-23
  • 2021-10-28
  • 2022-12-23
相关资源
相似解决方案