let proxy = {
  "/api/": {
    target: "https://ops.qmth.com.cn",
    pathRewrite: {
      // "^/api/sls/project": "/sls/project", // rewrite path
      // "^/api/sls/view": "/sls/view", // rewrite path
    },
    changeOrigin: true,
  },
};

var webpack = require("webpack");
module.exports = {
  lintOnSave: process.env.NODE_ENV !== "production" ? true : "error",
  outputDir: "../static/",
  publicPath: "/web/",
  devServer: {
    proxy,
  },
  configureWebpack: {
    devtool: "source-map",
    plugins: [
      // Ignore all locale files of moment.js
      // TODO: use webpack stats to check if iview locale matters
      new webpack.IgnorePlugin(/^\.\/locale$/, /moment|iview$/),
    ],
  },
  transpileDependencies: [/\bvue-awesome\b/],
};
