.umirc.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. // ref: https://umijs.org/config/
  2. export default {
  3. treeShaking: true,
  4. hash: true,
  5. routes: [
  6. {
  7. path: '/',
  8. component: '../layouts/index',
  9. routes: [
  10. { path: '/', component: '../pages/index' },
  11. // { path: '/explain', component: '../pages/Home' },
  12. // { path: '/hotlives', component: '../pages/HotLives' },
  13. ]
  14. }
  15. ],
  16. plugins: [
  17. // ref: https://umijs.org/plugin/umi-plugin-react.html
  18. ['umi-plugin-react', {
  19. antd: true,
  20. dva: false,
  21. dynamicImport: false, // { webpackChunkName: true },
  22. title: '',
  23. dll: true,
  24. routes: {
  25. exclude: [
  26. /models\//,
  27. /services\//,
  28. /model\.(t|j)sx?$/,
  29. /service\.(t|j)sx?$/,
  30. /components\//,
  31. ],
  32. },
  33. lessLoaderOptions: {
  34. javascriptEnabled: true,
  35. }
  36. }],
  37. ],
  38. proxy: {
  39. '/api-manage': {
  40. //target: 'http://api.starbuds.laylib.com',
  41. target: 'http://localhost:9210',
  42. changeOrigin: true,
  43. //pathRewrite: { '^/server': '' },
  44. },
  45. '/api-common': {
  46. //target: 'http://api.starbuds.laylib.com',
  47. target: 'http://localhost:9230',
  48. changeOrigin: true,
  49. //pathRewrite: { '^/server': '' },
  50. },
  51. '/api-app': {
  52. //target: 'http://api.starbuds.laylib.com',
  53. target: 'http://localhost:9201',
  54. changeOrigin: true,
  55. //pathRewrite: { '^/server': '' },
  56. }
  57. },
  58. targets: {
  59. ie: 9,
  60. }
  61. }