vue.config.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. module.exports = {
  2. devServer: {
  3. proxy: {
  4. '/data': {
  5. target: 'http://192.168.200.87:9003',
  6. changeOrigin: true,
  7. secure: false,
  8. pathRewrite: {
  9. '^/data': '',
  10. },
  11. },
  12. '/wanda': {
  13. target: 'http://map.wanda.cn/editor/fmap/1001724_29',
  14. changeOrigin: true,
  15. pathRewrite: {
  16. '^/wanda': '',
  17. },
  18. },
  19. '/serve': {
  20. target: 'http://192.168.200.87:8088',
  21. changeOrigin: true,
  22. pathRewrite: {
  23. '^/serve': '',
  24. },
  25. },
  26. },
  27. hot: true,
  28. open: true,
  29. port: 8080,
  30. // 关闭esline
  31. overlay: {
  32. warnings: false,
  33. errors: false,
  34. },
  35. },
  36. chainWebpack: (config) => {
  37. const svgRule = config.module.rule('svg')
  38. svgRule.uses.clear()
  39. svgRule
  40. .use('babel-loader')
  41. .loader('babel-loader')
  42. .end()
  43. .use('vue-svg-loader')
  44. .loader('vue-svg-loader')
  45. },
  46. lintOnSave: false,
  47. publicPath: '/',
  48. }