vue.config.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. "/wdfn": {
  13. target: "http://map.wanda.cn",
  14. changeOrigin: true,
  15. pathRewrite: {
  16. "^/wdfn": "/editor/fmap",
  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. // 关闭esline
  29. overlay: {
  30. warnings: false,
  31. errors: false,
  32. },
  33. },
  34. chainWebpack: (config) => {
  35. const svgRule = config.module.rule("svg")
  36. svgRule.uses.clear()
  37. svgRule
  38. .use("babel-loader")
  39. .loader("babel-loader")
  40. .end()
  41. .use("vue-svg-loader")
  42. .loader("vue-svg-loader")
  43. },
  44. lintOnSave: false,
  45. publicPath: "/wandaBmGuide",
  46. // 打包名称
  47. outputDir: "wandaBmGuide",
  48. // 放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录
  49. assetsDir: "static",
  50. }