## webpack-dev-server > https://www.npmjs.com/package/webpack-dev-server ~~~ npm install webpack-dev-server --save-dev ~~~ ### package.json中配置 ``` "scripts": { "serve": "webpack serve" } ``` ### webpack.config.js #### devServer配置端口等信息 ![](https://img.kancloud.cn/b2/e4/b2e4ebaf268984356755a724450c2e09_745x177.png) ### 运行 npm run serve