config.ts 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /*
  2. * @Author: your name
  3. * @Date: 2022-01-07 10:04:20
  4. * @LastEditTime: 2022-02-09 13:56:26
  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. dva: {
  17. immer: true,
  18. hmr: true,
  19. },
  20. antd: {
  21. config: {
  22. prefixCls: 'kcmp-ant',
  23. // getPopupContainer:(triggerNode:HTMLElement)=>triggerNode
  24. },
  25. },
  26. lessLoader: {
  27. modifyVars: { '@ant-prefix': 'kcmp-ant' },
  28. }, //
  29. theme: {
  30. // '@primary-color': '#1d4984',
  31. },
  32. routes: [
  33. {
  34. path: '/',
  35. component: '@/layouts/index.tsx',
  36. routes: [
  37. {
  38. path: '/app1',
  39. microApp: 'app1',
  40. },
  41. {
  42. path: '/index',
  43. component: '@/pages/index/index.tsx',
  44. },
  45. {
  46. path: '/platform',
  47. component: '@/pages/platform/_layout.tsx',
  48. routes: [
  49. {
  50. path: '/platform/setting/userManage',
  51. component: '@/pages/platform/setting/userManage/index.tsx',
  52. },
  53. {
  54. path: '/platform/setting/hospManage',
  55. component: '@/pages/platform/setting/hospManage/index.tsx',
  56. },
  57. {
  58. path: '/platform/setting/menuManage',
  59. component: '@/pages/platform/setting/menuManage/index.tsx',
  60. },
  61. {
  62. path: '/platform/setting/roleManage',
  63. component: '@/pages/platform/setting/roleManage/index.tsx',
  64. },
  65. ],
  66. },
  67. { path: '/login', layout: false, component: '@/pages/login/index' },
  68. ],
  69. },
  70. ],
  71. proxy: proxy[REACT_APP_ENV || 'dev'],
  72. manifest: {
  73. basePath: '/',
  74. },
  75. fastRefresh: {},
  76. layout: {
  77. layout: 'top',
  78. },
  79. // mfsu: {},
  80. qiankun: {
  81. master: {
  82. sandbox: {
  83. // strictStyleIsolation:true,
  84. // // experimentalStyleIsolation: true, // 试验性
  85. },
  86. },
  87. },
  88. });