vue.config.js 1.6 KB

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