修改 package.json,添加如下脚本
"scripts": { "build": "webpack", "dev": "webpack-dev-server" },
yarn run dev
yarn run build