vue.config.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. const path = require('path');
  2. // const proxy_path = 'http://192.168.2.241:88';
  3. const proxy_path = 'http://173.18.12.195:5050';
  4. // const proxy_path = 'http://192.168.65.95:5050'; //沙雅线上地址
  5. // const proxy_path = 'http://192.168.3.117:5050';//周铁刚
  6. // const proxy_path = 'http://192.168.3.113:5050'; //王峰
  7. module.exports = {
  8. lintOnSave: false,
  9. runtimeCompiler: true,
  10. devServer: {
  11. historyApiFallback: true,
  12. disableHostCheck: true,
  13. port: 4500,
  14. proxy: {
  15. '/api': {
  16. target: proxy_path,
  17. changeOrigin: true,
  18. secure: false,
  19. },
  20. '/other_api': {
  21. target: "http://172.16.8.54:8086",
  22. changeOrigin: true,
  23. secure: false,
  24. pathRewrite: {
  25. "^/other_api": ""
  26. }
  27. },
  28. '/knowledge': {
  29. target: "http://173.18.12.205:8001",
  30. changeOrigin: true,
  31. secure: false,
  32. // pathRewrite: {
  33. // "^/kgrt_api": ""
  34. // }
  35. },
  36. '/pdf_api': {
  37. target: "http://173.18.12.197:9200",
  38. changeOrigin: true,
  39. secure: false,
  40. pathRewrite: {
  41. "^/pdf_api": ""
  42. },
  43. },
  44. '/fcr_api': {
  45. target: "http://173.18.12.195:5757",
  46. changeOrigin: true,
  47. secure: false,
  48. pathRewrite: {
  49. "^/fcr_api": ""
  50. },
  51. }
  52. },
  53. },
  54. configureWebpack: {
  55. resolve: {
  56. alias: {
  57. '@components': path.resolve(__dirname, './src/components/'),
  58. '@less': path.resolve(__dirname, './src/less/'),
  59. '@base': path.resolve(__dirname, './src/components/base/'),
  60. '@api': path.resolve(__dirname, './src/api/'),
  61. },
  62. },
  63. },
  64. };