vue.config.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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://173.18.12.195:6060';
  5. const proxy_path = 'http://172.16.8.60: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. '/klRule': {
  36. target: proxy_path,
  37. changeOrigin: true,
  38. secure: false
  39. },
  40. '/tran': {
  41. target: proxy_path,
  42. changeOrigin: true,
  43. secure: false
  44. },
  45. '/klRulePlan': {
  46. target: proxy_path,
  47. changeOrigin: true,
  48. secure: false
  49. },
  50. '/kl': {
  51. target: proxy_path,
  52. changeOrigin: true,
  53. secure: false
  54. },
  55. '/klDisease': {
  56. target: proxy_path,
  57. changeOrigin: true,
  58. secure: false
  59. },
  60. '/cache': {
  61. target: proxy_path,
  62. changeOrigin: true,
  63. secure: false
  64. }
  65. }
  66. },
  67. configureWebpack: {
  68. resolve: {
  69. alias: {
  70. '@components': path.resolve(__dirname, './src/components/'),
  71. '@less': path.resolve(__dirname, './src/less/'),
  72. '@base': path.resolve(__dirname, './src/components/base/'),
  73. '@api': path.resolve(__dirname, './src/api/')
  74. }
  75. }
  76. },
  77. };