vue.config.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. const path = require('path');
  2. //const proxy_path = 'http://192.168.2.241:80';
  3. // const proxy_path = 'http://192.168.2.236:88';
  4. const proxy_path = 'http://192.168.2.236:6060';
  5. //const proxy_path = 'http://192.168.2.241:6060';
  6. // const proxy_path = 'http://192.168.3.101:5050';
  7. // const proxy_path = 'http://192.168.3.117:5050';//周铁刚
  8. // const proxy_path = 'http://192.168.3.113:5050'; //王峰
  9. module.exports = {
  10. lintOnSave: false,
  11. devServer: {
  12. historyApiFallback: true,
  13. disableHostCheck: true,
  14. proxy: {
  15. '/api': {
  16. target: proxy_path,
  17. changeOrigin: true,
  18. secure: false
  19. },
  20. '/demo': {
  21. target: proxy_path,
  22. changeOrigin: true,
  23. secure: false
  24. },
  25. '/sys': {
  26. target: proxy_path,
  27. changeOrigin: true,
  28. secure: false
  29. },
  30. '/graph': {
  31. target: proxy_path,
  32. changeOrigin: true,
  33. secure: false
  34. }
  35. }
  36. },
  37. configureWebpack:{
  38. resolve:{
  39. alias: {
  40. '@components': path.resolve(__dirname,'./src/components/'),
  41. '@less': path.resolve(__dirname,'./src/less/'),
  42. '@base':path.resolve(__dirname,'./src/components/base/'),
  43. '@api': path.resolve(__dirname,'./src/api/')
  44. }
  45. }
  46. },
  47. };