配置页面
config—index.js
dev: {
proxyTable: {
'/xiaohua': {
target: 'https://127.0.0.1:50066', // 后台接口域名
changeOrigin: true, //是否跨域
pathRewrite: {
'^/xiaohua': '/xiaohua'
}
}
},
host: 'localhost', // can be overwritten by process.env.HOST
port: 8081, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: true,//autoOpenBrowser 自动打开浏览器
errorOverlay: true,
notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
/**
* Source Maps
*/
// https://webpack.js.org/configuration/devtool/#development
devtool: 'cheap-module-eval-source-map',
// If you have problems debugging vue-files in devtools,
// set this to false - it *may* help
// https://vue-loader.vuejs.org/en/options.html#cachebusting
cacheBusting: true,
cssSourceMap: true
},
dev: {
proxy