.umirc.js 1.4 KB

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