28 lines
821 B
JavaScript
28 lines
821 B
JavaScript
const { defineConfig } = require('@vue/cli-service')
|
||
module.exports = defineConfig({
|
||
lintOnSave: false,
|
||
transpileDependencies: true,
|
||
pluginOptions: {
|
||
vuetify: {
|
||
// https://github.com/vuetifyjs/vuetify-loader/tree/next/packages/vuetify-loader
|
||
}
|
||
},
|
||
|
||
devServer: {
|
||
open: true,
|
||
|
||
proxy: {
|
||
'/api': {
|
||
target: 'http://127.0.0.1:8000',//要代理的本地api地址,也可以换成线上测试地址
|
||
changeOrigin: true,//允许跨域
|
||
pathRewrite: { "^/api": "/api" }//将/api开头替换为/api
|
||
},
|
||
'/upload': {
|
||
target: 'http://127.0.0.1:8000',//要代理的本地api地址,也可以换成线上测试地址
|
||
changeOrigin: true,//允许跨域
|
||
pathRewrite: { "^/upload": "/upload" }//将/api开头替换为/api
|
||
}
|
||
}
|
||
},
|
||
})
|