var path = require('path')
var erpAPI = 'http://47.100.21.215:40402'
var authAPI = 'http://47.110.145.204:8095'
var mesAPI = 'http://47.110.145.204:8191/'
var mockAPI = 'http://47.110.145.204:22101/mesAPI'
mesAPI = 'http://47.110.145.204:59168/FIIA/api/'
// mesAPI = 'http://192.168.0.148:5000/'
module.exports = {
  build: {
    env: require('./prod.env'),
    index: path.resolve(__dirname, '../dist/index.html'),
    assetsRoot: path.resolve(__dirname, '../dist'),
    assetsSubDirectory: 'static',
    assetsPublicPath: '/BMS/web/',
    productionSourceMap: false, // 打包的时候不生产出map文件 减小体积 false
    productionGzip: false,
    productionGzipExtensions: ['js', 'css'],
    bundleAnalyzerReport: process.env.npm_config_report
  },
  dev: {
    env: require('./dev.env'),
    host: '0.0.0.0',
    port: 8231,
    autoOpenBrowser: true,
    assetsSubDirectory: 'static',
    assetsPublicPath: '/',
    proxyTable: {
      '/mesAPI': {
        target: mesAPI,
        changeOrigin: true,
        pathRewrite: {
          '^/mesAPI': ''
        }
      },
      '/erpAPI': {
        target: erpAPI,
        changeOrigin: true,
        pathRewrite: {
          '^/erpAPI': ''
        }
      },
      '/authAPI': {
        target: authAPI,
        changeOrigin: true,
        pathRewrite: {
          '^/authAPI': ''
        }
      },
      '/mockAPI': {
        target: mockAPI,
        changeOrigin: true,
        pathRewrite: {
          '^/mockAPI': ''
        }
      }
    },
    cssSourceMap: false
  }
}
