vue.config.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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',
  17. },
  18. },
  19. '/serve': {
  20. target: 'http://192.168.200.87:8088',
  21. changeOrigin: true,
  22. pathRewrite: {
  23. '^/serve': '',
  24. },
  25. },
  26. '/version': {
  27. target: 'http://mapapp.wanda.cn/',
  28. changeOrigin: true,
  29. pathRewrite: {
  30. '^/version': '/sgmap/mapversion',
  31. },
  32. },
  33. },
  34. hot: true,
  35. // 关闭esline
  36. overlay: {
  37. warnings: false,
  38. errors: false,
  39. },
  40. },
  41. chainWebpack: (config) => {
  42. const svgRule = config.module.rule('svg')
  43. svgRule.uses.clear()
  44. svgRule
  45. .use('babel-loader')
  46. .loader('babel-loader')
  47. .end()
  48. .use('vue-svg-loader')
  49. .loader('vue-svg-loader')
  50. },
  51. lintOnSave: false,
  52. publicPath: '/wandaBmGuide',
  53. // 打包名称
  54. outputDir: 'wandaBmGuide',
  55. // 放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录
  56. assetsDir: 'static',
  57. }