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"
原文地址:https://www.cnblogs.com/lbx6935/p/12153025.html
时间: 2024-10-31 03:13:19