var WEBPACK_ENV = process.env.WEBPACK_ENV || 'dev';console.log(WEBPACK_ENV);if('dev === WEBPACK_ENV'){ config.entry.common.push('webpack-dev-server/client?http://localhost:8088/');}"scripts": { "dev": "WEBPACK_ENV=dev webpack-dev-server --inline --port 8088", "dev_win" : "set WEBPACK_ENV=dev && webpack-dev-server --inline --port 8088", "dist": "WEBPACK_ENV=online webpack -p", "dev_win": "set WEBPACK_ENV=online && webpack -p" },
7 回答
小王子抓猫咪
TA贡献9条经验 获得超7个赞
第一,先去看看package.json里面的script dev 这个脚本的内容
第二,感觉问题出在webpack_env = dev 和后面的webpack-dev-server中间缺少一个 & 符号
- 7 回答
- 0 关注
- 5754 浏览
添加回答
举报
0/150
提交
取消