module.exports = {
  configureWebpack: {
    devtool: 'source-map'
  },
  //路径前缀
  publicPath: "/manage/",
  outputDir: "manage",
  lintOnSave: true,
  productionSourceMap: false,
  chainWebpack: config => {
    config.plugins.delete('case-sensitive-paths')
    //忽略的打包文件
    config.externals({
      vue: "Vue",
      "vue-router": "VueRouter",
      vuex: "Vuex",
      axios: "axios",
      "element-ui": "ELEMENT"
    });
    const entry = config.entry("app");
    entry.add("babel-polyfill").end();
    entry.add("classlist-polyfill").end();
    entry.add("@/mock").end();
  },
  devServer: {
    host: "0.0.0.0",
    port: 1888,
    proxy: {
      "/api": {
        target: 'http://39.98.44.136:6013',
        // target: 'http://10.165.0.173:8000',
        ws: true,
        changeOrigin: true,
        pathRewrite: {
          '^/api': '/'
        }
      },
      "/qq/map": {
        //本地服务接口地址
        target: "https://apis.map.qq.com",
        ws: true,
        pathRewrite: {
          "^/qq/map": "/"
        }
      }
    }
  }
};
