Fluxible 生成的应用程序的webpack-dev-server.js中的以下行给出错误“未定义外壳”
shell.env.PORT = shell.env.PORT || 3001;
shell.exec('"./node_modules/.bin/nodemon" start.js -e js,jsx', function () {});
我做了
var shell = require('child_process');
.listen(3000, function () {
shell.env = process.env;
shell.env.port = 3001;
shell.exec('"./node_modules/.bin/nodemon" start.js -e js,jsx', function () {});
console.log('Webpack Dev Server listening on port 3000');
});
更改后,服务器启动时没有错误,但更改后自动重新启动仍然不起作用。我究竟做错了什么?