vue.config.js 732 B

123456789101112131415161718192021222324252627282930313233343536
  1. let proxy = {
  2. "/ocean/api": {
  3. target: "http://192.168.10.30:10060",
  4. changeOrigin: true
  5. },
  6. "/skynet/api": {
  7. target: "http://192.168.10.39:8030",
  8. changeOrigin: true
  9. }
  10. };
  11. var webpack = require("webpack");
  12. module.exports = {
  13. devServer: {
  14. proxy
  15. },
  16. chainWebpack: config => {
  17. // iview Loader
  18. config.module
  19. .rule("vue")
  20. .test(/\.vue$/)
  21. .use("iview-loader")
  22. .loader("iview-loader")
  23. .options({
  24. prefix: true
  25. })
  26. .end();
  27. },
  28. configureWebpack: {
  29. plugins: [
  30. // Ignore all locale files of moment.js
  31. // TODO: use webpack stats to check if iview locale matters
  32. new webpack.IgnorePlugin(/^\.\/locale$/, /moment|iview$/)
  33. ]
  34. }
  35. };