vue.config.js 665 B

123456789101112131415161718192021222324252627
  1. const defProxy = {
  2. "/api": {
  3. target: process.env.VUE_APP_MAIN_PROXY,
  4. changeOrigin: true,
  5. },
  6. "/file": {
  7. target: process.env.VUE_APP_MAIN_PROXY_FILE,
  8. changeOrigin: true,
  9. },
  10. };
  11. var webpack = require("webpack");
  12. module.exports = {
  13. lintOnSave: process.env.NODE_ENV !== "production" ? true : "error",
  14. devServer: {
  15. proxy: defProxy,
  16. },
  17. configureWebpack: {
  18. devtool: "source-map",
  19. plugins: [
  20. // Ignore all locale files of moment.js
  21. // TODO: use webpack stats to check if iview locale matters
  22. new webpack.IgnorePlugin(/^\.\/locale$/, /moment|iview$/),
  23. ],
  24. },
  25. transpileDependencies: [/\bvue-awesome\b/],
  26. };