var path = require('path') module.exports = { build: { env: require('./prod.env'), index: path.resolve(__dirname, '../dist/index.html'), assetsRoot: path.resolve(__dirname, '../dist'), assetsSubDirectory: 'static', assetsPublicPath: './', productionSourceMap: true, productionGzip: false, productionGzipExtensions: ['js', 'css'], bundleAnalyzerReport: process.env.npm_config_report }, dev: { env: require('./dev.env'), port: 8090, autoOpenBrowser: true, assetsSubDirectory: 'static', assetsPublicPath: '/', proxyTable: { '/api': { target: 'http://192.168.101.6:8099', // 接口域名 开发 secure: true, // 如果是https接口,需要配置这个参数 changeOrigin: true, //是否跨域 pathRewrite: { // 如果接口本身没有api的路径,那么这里将发送到后端的请求重写为没有api的路径 '^/api': '/' } }, '/ips': { target: 'http://192.168.101.6:8080', // 接口域名 开发 secure: true, // 如果是https接口,需要配置这个参数 changeOrigin: true, //是否跨域 pathRewrite: { // 如果接口本身没有api的路径,那么这里将发送到后端的请求重写为没有api的路径 '^/ips': '/' } }, }, cssSourceMap: false } }