Vue项目配置本地访问地址和IP访问地址
Vue项目配置本地访问地址和IP访问地址1.在config/index.js配置:dev: {host: '0.0.0.0',}2.在build/webpack.dev.config.js更改compilationSuccessInfo的message,如下:compilationSuccessInfo: {// messages: [`Your application is running he
·
Vue项目配置本地访问地址和IP访问地址
1.在config/index.js配置:
dev: {
host: '0.0.0.0',
}
2.在build/webpack.dev.config.js更改compilationSuccessInfo的message,如下:
compilationSuccessInfo: {
// messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`],
messages: [
`Your application is running here:`,
`Local: http://localhost:${port}`,
`Network: http://${require('ip').address()}:${port}`,
],
},
更多推荐
已为社区贡献3条内容
所有评论(0)