vue项目中无法实现内网穿透,因为localhost的限制
"version": "1.0.0","description": "y","author": "y","private": true,"scripts": {"dev": "webpack-dev-serve
·
"version": "1.0.0",
"description": "y",
"author": "y",
"private": true,
"scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js --host 192.168.124.53",
"start": "npm run dev",
"build": "node build/build.js"
},
只需要在package.json中script中添加--host 你的ip地址就行
运行vue项目,打开项目,不是localhost:8080了,例如我的就是192.168.124.53:8080,,,,,,,,,,此时你可以内网穿透,在手机上访问自己的网页
祝工作顺利,身体健康
更多推荐
已为社区贡献14条内容
所有评论(0)