package.json 中
"scripts": { "test": "echo \"Error: no test specified\" && exit 1", "dev": "webpack-dev-server --open --port 3000 --contentBase src --hot --host 192.168.0.106", "dev1": "webpack-dev-server" },
添加 --host 加当前局域网ip
"dev": "webpack-dev-server --open --port 3000 --contentBase src --hot --host 192.168.0.106"