vue.config.js 1.5 KB

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