vue.config.js 931 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. pages: {
  18. index: {
  19. entry: "src/main.js",
  20. template: "public/index.html",
  21. filename: "index.html",
  22. },
  23. download: {
  24. entry: "pages/download/main.js",
  25. template: "public/download.html",
  26. filename: "download.html",
  27. },
  28. },
  29. configureWebpack: {
  30. devtool: "source-map",
  31. plugins: [
  32. // Ignore all locale files of moment.js
  33. // TODO: use webpack stats to check if iview locale matters
  34. new webpack.IgnorePlugin(/^\.\/locale$/, /moment|iview$/),
  35. ],
  36. },
  37. transpileDependencies: [/\bvue-awesome\b/],
  38. };