vue.config.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. module.exports = {
  2. devServer: {
  3. proxy: {
  4. '/api': {
  5. target: 'http://192.168.200.87:9003',
  6. changeOrigin: true,
  7. secure: false,
  8. pathRewrite: {
  9. '^/api': '',
  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/topology-wanda',
  21. changeOrigin: true,
  22. secure: false,
  23. pathRewrite: {
  24. '^/serve': '',
  25. },
  26. },
  27. },
  28. hot: true,
  29. open: true,
  30. port: 8080,
  31. // 关闭esline
  32. overlay: {
  33. warnings: false,
  34. errors: false,
  35. },
  36. },
  37. chainWebpack: (config) => {
  38. const svgRule = config.module.rule('svg')
  39. svgRule.uses.clear()
  40. svgRule
  41. .use('babel-loader')
  42. .loader('babel-loader')
  43. .end()
  44. .use('vue-svg-loader')
  45. .loader('vue-svg-loader')
  46. },
  47. lintOnSave: false,
  48. publicPath: '/dist',
  49. }