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.

78 lines
2.2 KiB

4 months ago
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: [
'ml-matrix',
'@antv/g6',
'@antv/layout',
'@antv/util'
],
devServer: {
host: '0.0.0.0',
3 months ago
port: 81,
4 months ago
open: true,
proxy: {
3 months ago
'/login': {
target: 'http://localhost:8088', // 更新为8088端口
4 months ago
changeOrigin: true,
pathRewrite: {
3 months ago
'^/login': '/api/login'
4 months ago
}
3 months ago
},
'/logout': {
target: 'http://localhost:8088', // 更新为8088端口
changeOrigin: true,
pathRewrite: {
'^/logout': '/api/logout'
}
},
'/userInfo': {
target: 'http://localhost:8088', // 更新为8088端口
changeOrigin: true,
pathRewrite: {
'^/userInfo': '/api/userInfo'
}
},
'/updateAvatar': {
target: 'http://localhost:8088', // 更新为8088端口
changeOrigin: true,
pathRewrite: {
'^/updateAvatar': '/api/updateAvatar'
}
},
'/updatePassword': {
target: 'http://localhost:8088', // 更新为8088端口
changeOrigin: true,
pathRewrite: {
'^/updatePassword': '/api/updatePassword'
}
},
3 months ago
'/register': {
target: 'http://localhost:8088', // 注册接口代理
changeOrigin: true,
pathRewrite: {
'^/register': '/api/register'
}
},
'/checkUsername': {
target: 'http://localhost:8088', // 检查用户名接口代理
changeOrigin: true,
pathRewrite: {
'^/checkUsername': '/api/checkUsername'
}
},
3 months ago
'/resource': {
target: 'http://localhost:8088', // 更新为8088端口
changeOrigin: true
4 months ago
}
},
3 months ago
historyApiFallback: {
disableDotRule: true,
verbose: true
},
4 months ago
// 替代 disableHostCheck: true
allowedHosts: 'all' // 允许所有 Host 访问(开发环境安全)
},
}
)