const proxy = {
  "/api/ecs_core": {
    target: process.env.VUE_APP_CORE_HOST_URL,
    changeOrigin: true
  },
  "/api/ecs_exam_work": {
    target: process.env.VUE_APP_EXAM_WORK_HOST_URL,
    changeOrigin: true
  },
  "/api/ecs_outlet": {
    target: process.env.VUE_APP_EXCHANGE_HOST_URL,
    changeOrigin: true
  },
  "/api/ecs_ques": {
    target: process.env.VUE_APP_QUESTIONS_HOST_URL,
    changeOrigin: true
  },
  "/api/ecs_oe_admin": {
    target: process.env.VUE_APP_OE_HOST_URL,
    changeOrigin: true
  },
  "/api/ecs_oe_student": {
    target: process.env.VUE_APP_OE_HOST_URL,
    changeOrigin: true
  },
  "/api/ecs_marking": {
    target: process.env.VUE_APP_MARKING_HOST_URL,
    changeOrigin: true
  },
  "/api/ecs_data_process": {
    target: process.env.VUE_APP_DATA_PROCESS_HOST_URL,
    changeOrigin: true
  },
  "/api/ecs_prt": {
    target: process.env.VUE_APP_PRINT_HOST_URL,
    changeOrigin: true
  },
  "/api/ctr/task": {
    target: process.env.VUE_APP_TASK_HOST_URL,
    changeOrigin: true
  },
  "/api/ecs_reports": {
    target: process.env.VUE_APP_REPORTS_HOST_URL,
    changeOrigin: true
  }
};

var webpack = require("webpack");
module.exports = {
  devServer: {
    proxy
  },
  configureWebpack: {
    // devtool: "source-map",  // for vscode debug
    plugins: [
      // Ignore all locale files of moment.js
      new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/)
    ]
  },
  transpileDependencies: [
    /\bvue-awesome\b/,
    /\bvue-echarts\b/,
    /\bresize-detector\b/
  ]
};
