webpack-dev-server 官方issue链接:
https://github.com/webpack/webpack-dev-server/issues/2759
原因:
webpack-dev-server更新版本,命令行由原来的
webpack dev serve改为了webpack serve
故,package.json中需改为:
"scripts": {
"dev": "webpack serve --mode development"
}
详见github Readme:
https://github.com/webpack/webpack-dev-server