config.ts 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /*
  2. * @Author: your name
  3. * @Date: 2022-01-07 10:04:20
  4. * @LastEditTime: 2022-02-14 16:28:05
  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. },
  68. { path: '/login', layout: false, component: '@/pages/login/index' },
  69. ],
  70. },
  71. ],
  72. proxy: proxy[REACT_APP_ENV || 'dev'],
  73. manifest: {
  74. basePath: '/',
  75. },
  76. fastRefresh: {},
  77. layout: {
  78. layout: 'top',
  79. title: '医务中台',
  80. },
  81. // mfsu: {},
  82. qiankun: {
  83. master: {
  84. sandbox: {
  85. // strictStyleIsolation:true,
  86. // // experimentalStyleIsolation: true, // 试验性
  87. },
  88. },
  89. },
  90. });