module.exports = { lintOnSave: false, configureWebpack: { externals: { BMap: 'BMap', // 百度地图配置 }, }, devServer: { disableHostCheck: true, open: true, // 自动打开浏览器 host: '0.0.0.0', // 允许外部ip访问 port: 8082, // 端口 https: false, // 启用https hotOnly: true, //热更新 overlay: { warnings: true, errors: true, // 错误、警告在页面弹出 }, proxy: { '/universaltestsoftware_client_api/ws': { target: 'http://127.0.0.1:8081/', // 后端服务地址 // target: 'http://192.168.100.26:8081/', // 后端服务地址 // target: 'http://192.168.100.30:8081/', // 后端服务地址 // target: 'http://192.168.100.40:8081/', // 后端服务地址 ws: true, // 启用WebSocket代理 changeOrigin: true, // 改变源地址 // pathRewrite: { // '^/ws': '/ws' // 路径重写,确保与后端路径一致 // } }, '/universaltestsoftware_client_api/api/': { target: `http://127.0.0.1:8081/`,//三杰 // target: 'http://192.168.100.30:8081/', //何杰 // target: 'http://192.168.100.26:8081/', // 三杰 // target: 'http://192.168.100.40:8081/', // 三杰 }, }, }, }