.umirc.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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: '/art', component: '../pages/Art' },
  16. // { path: '/explain', component: '../pages/Home' },
  17. { path: '/hotlives', component: '../pages/HotLives' },
  18. ]
  19. }
  20. ],
  21. plugins: [
  22. // ref: https://umijs.org/plugin/umi-plugin-react.html
  23. ['umi-plugin-react', {
  24. antd: true,
  25. dva: false,
  26. dynamicImport: false, // { webpackChunkName: true },
  27. title: 'xk-umi',
  28. dll: true,
  29. routes: {
  30. exclude: [
  31. /models\//,
  32. /services\//,
  33. /model\.(t|j)sx?$/,
  34. /service\.(t|j)sx?$/,
  35. /components\//,
  36. ],
  37. },
  38. lessLoaderOptions: {
  39. javascriptEnabled: true,
  40. }
  41. }],
  42. ],
  43. proxy: {
  44. '/api-manage': {
  45. target: 'http://api.starbuds.laylib.com',
  46. changeOrigin: true,
  47. //pathRewrite: { '^/server': '' },
  48. },
  49. '/api-common': {
  50. target: 'http://api.starbuds.laylib.com',
  51. changeOrigin: true,
  52. //pathRewrite: { '^/server': '' },
  53. },
  54. '/api-app': {
  55. target: 'http://api.starbuds.laylib.com',
  56. changeOrigin: true,
  57. //pathRewrite: { '^/server': '' },
  58. }
  59. },
  60. targets: {
  61. ie: 9,
  62. }
  63. }