var path = require('path')
var mesAPI = 'http://47.110.145.204:22121/mesAPI'
// var mesAPI = 'http://47.97.182.182:22101'
var erpAPI = 'http://47.100.21.215:40402'
var authAPI = 'http://47.110.145.204:8095/'
// var erPiUrl = 'http://47.100.21.215:40402'
var mesAPI = 'http://47.110.145.204:8109/' // 
mesAPI = 'http://192.168.4.116:5000/'
mesAPI = 'http://192.168.4.120:23000/'
var mockAPI = 'http://47.110.145.204:8082/mock/239'
module.exports = {
  build: {
    env: require('./prod.env'),
    index: path.resolve(__dirname, '../dist/index.html'),
    assetsRoot: path.resolve(__dirname, '../dist'),
    assetsSubDirectory: 'static',
    assetsPublicPath: '/',
    productionSourceMap: false, // 打包的时候不生产出map文件 减小体积 false
    productionGzip: false,
    productionGzipExtensions: ['js', 'css'],
    bundleAnalyzerReport: process.env.npm_config_report
  },
  dev: {
    env: require('./dev.env'),
    port: 8089,
    autoOpenBrowser: true,
    assetsSubDirectory: 'static',
    assetsPublicPath: '/',
    proxyTable: {
      '/mesAPI': {
        timeout: 6*60*1000,
        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
  }
}
