config.ts 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /*
  2. * @Author: your name
  3. * @Date: 2022-01-07 10:04:20
  4. * @LastEditTime: 2022-03-30 10:59:29
  5. * @LastEditors: Please set LastEditors
  6. * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  7. * @FilePath: /KC-MiddlePlatform/config/config.ts
  8. */
  9. import { defineConfig } from 'umi';
  10. import proxy from './proxy';
  11. const { REACT_APP_ENV } = process.env;
  12. export default defineConfig({
  13. nodeModulesTransform: {
  14. type: 'none',
  15. },
  16. publicPath: '/',
  17. dva: {
  18. immer: true,
  19. hmr: true,
  20. },
  21. antd: {
  22. config: {
  23. prefixCls: 'kcmp-ant',
  24. // getPopupContainer:(triggerNode:HTMLElement)=>triggerNode
  25. },
  26. },
  27. lessLoader: {
  28. modifyVars: { '@ant-prefix': 'kcmp-ant' },
  29. }, //
  30. theme: {
  31. '@primary-color': '#3376FE',
  32. },
  33. routes: [
  34. {
  35. path: '/',
  36. component: '@/layouts/index.tsx',
  37. routes: [
  38. {
  39. path: '/app1',
  40. microApp: 'app1',
  41. },
  42. {
  43. path: '/index',
  44. component: '@/pages/index/index.tsx',
  45. },
  46. {
  47. title:'精益管管理中台',
  48. path: '/platform',
  49. component: '@/pages/platform/_layout.tsx',
  50. routes: [
  51. {
  52. path: '/platform/setting/userManage',
  53. component: '@/pages/platform/setting/userManage/index.tsx',
  54. },
  55. {
  56. path: '/platform/setting/hospManage',
  57. component: '@/pages/platform/setting/hospManage/index.tsx',
  58. },
  59. {
  60. path: '/platform/setting/menuManage',
  61. component: '@/pages/platform/setting/menuManage/index.tsx',
  62. },
  63. {
  64. path: '/platform/setting/roleManage',
  65. component: '@/pages/platform/setting/roleManage/index.tsx',
  66. },
  67. {
  68. path: '/platform/setting/reports',
  69. component: '@/pages/platform/setting/reports/index.tsx',
  70. },
  71. ],
  72. },
  73. {
  74. path: '/personalCenter',
  75. component: '@/pages/personalCenter/index.tsx',
  76. },
  77. { path: '/login', layout: false, component: '@/pages/login/index' },
  78. ],
  79. },
  80. ],
  81. proxy: proxy[REACT_APP_ENV || 'dev'],
  82. manifest: {
  83. basePath: '/',
  84. },
  85. fastRefresh: {},
  86. layout: {
  87. layout: 'top',
  88. },
  89. // mfsu: {},
  90. qiankun: {
  91. master: {
  92. sandbox: {
  93. // strictStyleIsolation:true,
  94. // // experimentalStyleIsolation: true, // 试验性
  95. },
  96. },
  97. },
  98. });