config.ts 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /*
  2. * @Author: your name
  3. * @Date: 2022-01-07 10:04:20
  4. * @LastEditTime: 2022-03-04 15:53:22
  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. path: '/platform',
  48. component: '@/pages/platform/_layout.tsx',
  49. routes: [
  50. {
  51. path: '/platform/setting/userManage',
  52. component: '@/pages/platform/setting/userManage/index.tsx',
  53. },
  54. {
  55. path: '/platform/setting/hospManage',
  56. component: '@/pages/platform/setting/hospManage/index.tsx',
  57. },
  58. {
  59. path: '/platform/setting/menuManage',
  60. component: '@/pages/platform/setting/menuManage/index.tsx',
  61. },
  62. {
  63. path: '/platform/setting/roleManage',
  64. component: '@/pages/platform/setting/roleManage/index.tsx',
  65. },
  66. {
  67. path: '/platform/setting/reports',
  68. component: '@/pages/platform/setting/reports/index.tsx',
  69. },
  70. ],
  71. },
  72. {
  73. path: '/personalCenter',
  74. component: '@/pages/personalCenter/index.tsx',
  75. },
  76. { path: '/login', layout: false, component: '@/pages/login/index' },
  77. ],
  78. },
  79. ],
  80. proxy: proxy[REACT_APP_ENV || 'dev'],
  81. manifest: {
  82. basePath: '/',
  83. },
  84. fastRefresh: {},
  85. layout: {
  86. layout: 'top',
  87. title: '医务中台',
  88. },
  89. // mfsu: {},
  90. qiankun: {
  91. master: {
  92. sandbox: {
  93. // strictStyleIsolation:true,
  94. // // experimentalStyleIsolation: true, // 试验性
  95. },
  96. },
  97. },
  98. });