vue.config.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. module.exports = {
  2. devServer: {
  3. port: 8091,
  4. open:true,
  5. // 关闭esline
  6. overlay: {
  7. warnings: false,
  8. errors: false,
  9. },
  10. proxy: {
  11. '/wdfn': {
  12. target: 'http://map.wanda.cn',
  13. changeOrigin: true,
  14. pathRewrite: {
  15. '^/wdfn': '/editor',
  16. },
  17. },
  18. '/serve': {
  19. // target: 'http://192.168.200.87:8088/',
  20. // target: 'http://192.168.200.83:8085/',
  21. target: 'http://60.205.177.43:8080', //阿里云
  22. changeOrigin: true,
  23. secure: false,
  24. pathRewrite: {
  25. '^/serve': '',
  26. },
  27. },
  28. '/data': {
  29. // target: 'http://192.168.200.87:9003',
  30. target: 'http://60.205.177.43:9903', //阿里云
  31. changeOrigin: true,
  32. secure: false,
  33. pathRewrite: {
  34. '^/data': '/data',
  35. },
  36. },
  37. },
  38. },
  39. chainWebpack: (config) => {
  40. const svgRule = config.module.rule('svg')
  41. svgRule.uses.clear()
  42. svgRule
  43. .use('babel-loader')
  44. .loader('babel-loader')
  45. .end()
  46. .use('vue-svg-loader')
  47. .loader('vue-svg-loader')
  48. },
  49. lintOnSave: false,
  50. // publicPath: '/dist',
  51. publicPath: '/wandaTopol',
  52. // 打包名称
  53. outputDir: 'wandaTopol',
  54. // 放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录
  55. assetsDir: 'static',
  56. }