You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
const {defineConfig} = require('@vue/cli-service')
|
|
|
|
module.exports = defineConfig({
|
|
|
|
transpileDependencies: true,
|
|
|
|
lintOnSave: false,
|
|
|
|
// 方式一
|
|
|
|
// devServer: {
|
|
|
|
// proxy: 'http://localhost:5000'
|
|
|
|
// }
|
|
|
|
devServer: {
|
|
|
|
proxy: {
|
|
|
|
'/stu': {
|
|
|
|
target: 'http://localhost:5000',
|
|
|
|
pathRewrite: {'^/stu':''},
|
|
|
|
ws: true, // 是否支持websocket
|
|
|
|
changeOrigin: true // 控制请求头中的host值
|
|
|
|
},
|
|
|
|
'/car': {
|
|
|
|
target: 'http://localhost:5001',
|
|
|
|
pathRewrite: {'^/car':''},
|
|
|
|
ws: true, // 是否支持websocket
|
|
|
|
changeOrigin: true // 控制请求头中的host值
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|