let config = {
  devServer: {
    proxy: {
      '/api': {
        // target: "https://miniapp-api.wxatech.com/game-bsdk/",
        target: "https://miniapp-testapi.wxatech.com/game-bsdk/",
        changeOrigin: true,
        pathRewrite: {
          "^/api": "/api"
        }
      }
    }
  }
};
if (process.env.NODE_ENV === 'production') {
  if (process.env.VUE_APP_TITLE === 'testEnv') { // 测试服务器
    config.publicPath = 'https://miniapp-testapi.wxatech.com/app_pages';
    config.indexPath = 'walk_daka.html';
    config.assetsDir = 'walk_static';
  } else { // 线上服务器
    config.publicPath = 'https://miniapp-api.wxatech.com/app_pages';
    config.indexPath = 'walk_daka.html';
    config.assetsDir = 'walk_static';
  }
}
module.exports = config;