Let vue project can be accessed simultaneously by localhost and IP, and avoid embarrassing start to the opening page of 0.0.0.0

1. First you need to config / index.js modify the host is 0.0.0.0

 

2. Configure useLocalIp in devWebpackConfig build / webpack.dev.conf.js of: true (there may be different wording), which will open the page is ip: port form, but you can also localhost: port or 127.0 .0.1: port to open the page. 

 

Published 37 original articles · won praise 8 · views 60000 +

Guess you like

Origin blog.csdn.net/qq_34122822/article/details/103717358