module.exports = { devServer: { host: '0.0.0.0', // 外网访问 port: 8080, // 端口号 https: false, // https:{type:Boolean} open: false, // 配置自动启动浏览器 open: 'Google Chrome'-默认启动谷歌 // 配置多个代理 proxy: { '/sso': { target: 'http://192.168.40.80:12344/sso/', ws: true, // 代理的WebSockets changeOrigin: true, // 允许websockets跨域 pathRewrite: { '^/sso': '', }, }, '/base': { target: 'http://192.168.40.80:12345/base/', ws: true, // 代理的WebSockets changeOrigin: true, // 允许websockets跨域 pathRewrite: { '^/base': '', }, }, '/platform': { target: 'http://192.168.40.80:12346/platform/', ws: true, // 代理的WebSockets changeOrigin: true, // 允许websockets跨域 pathRewrite: { '^/platform': '', }, }, '/production': { target: 'http://192.168.40.80:12347/production/', ws: true, // 代理的WebSockets changeOrigin: true, // 允许websockets跨域 pathRewrite: { '^/production': '', }, }, }, }, }