27 lines
614 B
JavaScript
27 lines
614 B
JavaScript
const path = require('path')
|
||
const resolve = dir => {
|
||
return path.join(__dirname, dir)
|
||
}
|
||
module.exports = {
|
||
devServer: {
|
||
proxy: {
|
||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||
'/api': {
|
||
target: `http://192.168.1.200:8085`,
|
||
changeOrigin: true,
|
||
pathRewrite: {
|
||
'^/api': ''
|
||
}
|
||
}
|
||
},
|
||
disableHostCheck: true
|
||
},
|
||
lintOnSave: false,
|
||
publicPath: './',
|
||
chainWebpack: config => {
|
||
config.resolve.alias
|
||
.set('@', resolve('src'))
|
||
.set('_c', resolve('src/components')) // key,value自行定义,比如.set('@@', resolve('src/components'))
|
||
},
|
||
}
|