vue.config.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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.3.101:5050';
  6. // const proxy_path = 'http://192.168.3.117:5050';//周铁刚
  7. // const proxy_path = 'http://192.168.3.113:5050'; //王峰
  8. module.exports = {
  9. lintOnSave: false,
  10. devServer: {
  11. historyApiFallback: true,
  12. disableHostCheck: true,
  13. proxy: {
  14. '/api': {
  15. target: proxy_path,
  16. changeOrigin: true,
  17. secure: false
  18. },
  19. '/demo': {
  20. target: proxy_path,
  21. changeOrigin: true,
  22. secure: false
  23. },
  24. '/sys': {
  25. target: proxy_path,
  26. changeOrigin: true,
  27. secure: false
  28. },
  29. '/graph': {
  30. target: proxy_path,
  31. changeOrigin: true,
  32. secure: false
  33. }
  34. }
  35. },
  36. configureWebpack:{
  37. resolve:{
  38. alias: {
  39. '@components': path.resolve(__dirname,'./src/components/'),
  40. '@less': path.resolve(__dirname,'./src/less/'),
  41. '@base':path.resolve(__dirname,'./src/components/base/'),
  42. '@api': path.resolve(__dirname,'./src/api/')
  43. }
  44. }
  45. },
  46. };