vuejs本地局域网访问

打开package.json,找到scripts下的dev 结尾增加一个参数 --host 192.168.191.1(更改为自己电脑ip)

"scripts": {
    "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js --host 192.168.191.1",
    "start": "npm run dev",
    "lint": "eslint --ext .js,.vue src",
    "build": "node build/build.js"
  },

参考链接:https://blog.csdn.net/zwkkkk1/java/article/details/79641916

posted @ 2020-07-14 15:46  木,曰曲直  阅读(357)  评论(0编辑  收藏  举报