打開package.json文件,找到下面的代碼node
"scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", "start": "npm run dev", "build": "node build/build.js" },
改爲webpack
"scripts": { "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js --host 192.168.0.114", "start": "npm run dev", "build": "node build/build.js" },
host後面是你的ip地址。web
能夠用草料生成二維碼,這樣就能夠用手機訪問啦npm