vue.config.js 1.5 KB

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