.umirc.ts 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /*
  2. * @Author: code4eat awesomedema@gmail.com
  3. * @Date: 2023-08-02 11:28:57
  4. * @LastEditors: code4eat awesomedema@gmail.com
  5. * @LastEditTime: 2024-11-18 16:40:00
  6. * @FilePath: /MediResourceManaSys/.umirc.ts
  7. * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  8. */
  9. import { defineConfig } from '@umijs/max';
  10. import MonacoWebpackPlugin from 'monaco-editor-webpack-plugin';
  11. const { REACT_APP_ENV } = process.env;
  12. const path = require('path');
  13. export default defineConfig({
  14. antd: {
  15. configProvider: {
  16. prefixCls: 'mrms-ant',
  17. },
  18. },
  19. // alias:{
  20. // 'ace-builds': path.resolve(__dirname, './node_modules/ace-builds/src-noconflict'),
  21. // },
  22. qiankun: {
  23. slave: {},
  24. },
  25. mfsu: false,
  26. lessLoader: {
  27. modifyVars: {
  28. '@ant-prefix': 'mrms-ant',
  29. '@primary-color': '#3377FF',
  30. '@border-color-base': '#dae2f2'
  31. },
  32. javascriptEnabled: true,
  33. }, //对应修改生成的 antd 样式类名
  34. chainWebpack(config, { webpack }) {
  35. config.plugin('monaco-editor').use(MonacoWebpackPlugin, [
  36. {
  37. // 指定需要加载的语言和特性
  38. languages: ['sql', 'javascript', 'typescript']
  39. }
  40. ]);
  41. },
  42. access: {},
  43. model: {},
  44. initialState: {},
  45. request: {},
  46. layout: {
  47. title: '医资管理系统',
  48. layout: 'side',
  49. menuProps: {
  50. theme: 'light',
  51. }
  52. },
  53. manifest: {
  54. basePath: '/',
  55. },
  56. publicPath: REACT_APP_ENV == 'dev' ? '/' : '/qualification/',
  57. proxy: {
  58. '/gateway': {
  59. target: 'http://120.27.235.181:5000/gateway',//开发
  60. //target:'http://47.96.149.190:5000/gateway', //演示
  61. changeOrigin: true,
  62. // pathRewrite: { '^/gateway': '' },
  63. }
  64. },
  65. routes: [
  66. {
  67. path: '/',
  68. redirect: '/home',
  69. },
  70. { path: '*', component: '@/pages/404' },
  71. {
  72. path: '/noAccess',
  73. component: './noAccess',
  74. },
  75. {
  76. path: '/home',
  77. component: './Home/index',
  78. },
  79. ],
  80. npmClient: 'yarn',
  81. });