【gulp+jq+html】添加环境变量,并在js中使用(判断环境,更改api接口域名)+ 附gulpfile.js代码
参考博文:gulp分离环境gulp中如何配置环境变量gulp环境变量配置1、安装cross-env插件npminstallcross-env-d2、package.json更改scripts"scripts":{"clean":"gulpclean","serve:test":"cross-envNODE_ENV=testgulp","serve:prod":"cross-envNODE_ENV=