vue.config.js 2.1 KB

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