标签:localhost ref disable 速度 vue-cli app cli 官方 href
step1: https://nodejs.org/en/ 安装nodejs
step2: 安装npm https://www.cnblogs.com/zhaomeizi/p/8483597.html 在命令行:cnpm install
step4: 启vue项目: npm run dev
修改vue.config.js里面的target改成localhost
// webpack-dev-server 相关配置
devServer: {
host: ‘0.0.0.0‘,
port: port,
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
target: `http://localhost:8080`,
changeOrigin: true,
pathRewrite: {
[‘^‘ + process.env.VUE_APP_BASE_API]: ‘‘
}
}
},
disableHostCheck: true
},
ref: https://www.jianshu.com/p/fbd87ad45631
标签:localhost ref disable 速度 vue-cli app cli 官方 href
原文地址:https://www.cnblogs.com/caesar-the-great/p/12807459.html