const { defineConfig } = require('@vue/cli-service') module.exports = defineConfig({ transpileDependencies: [ 'ml-matrix', '@antv/g6', '@antv/layout', '@antv/util' ], devServer: { host: '0.0.0.0', port: 81, open: true, proxy: { '/login': { target: 'http://localhost:8088', // 更新为8088端口 changeOrigin: true, pathRewrite: { '^/login': '/api/login' } }, '/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' } }, '/resource': { target: 'http://localhost:8088', // 更新为8088端口 changeOrigin: true } }, historyApiFallback: { disableDotRule: true, verbose: true }, // 替代 disableHostCheck: true allowedHosts: 'all' // 允许所有 Host 访问(开发环境安全) }, } )