https://www.udemy.com/webpack-2-the-complete-developers-guide/
安装依赖包:
yarn add webpack-dev-server@2.2.0 --dev
文件package.json
...
"scripts": {
"clean": "rimraf dist",
"build": "yarn run clean && webpack",
"serve": "webpack-dev-server"
},
...
运行:
yarn run serve
访问: http://localhost:8080/ 即可