vue.config.js 837 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. lintOnSave: process.env.NODE_ENV !== "production" ? true : "error",
  14. devServer: {
  15. proxy,
  16. },
  17. chainWebpack: config => {
  18. // iview Loader
  19. config.module
  20. .rule("vue")
  21. .test(/\.vue$/)
  22. .use("iview-loader")
  23. .loader("iview-loader")
  24. .options({
  25. prefix: true,
  26. })
  27. .end();
  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. };