/* * @Author: code4eat awesomedema@gmail.com * @Date: 2023-08-02 11:28:57 * @LastEditors: code4eat awesomedema@gmail.com * @LastEditTime: 2024-11-18 16:40:00 * @FilePath: /MediResourceManaSys/.umirc.ts * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ import { defineConfig } from '@umijs/max'; import MonacoWebpackPlugin from 'monaco-editor-webpack-plugin'; const { REACT_APP_ENV } = process.env; const path = require('path'); export default defineConfig({ antd: { configProvider: { prefixCls: 'mrms-ant', }, }, // alias:{ // 'ace-builds': path.resolve(__dirname, './node_modules/ace-builds/src-noconflict'), // }, qiankun: { slave: {}, }, mfsu: false, lessLoader: { modifyVars: { '@ant-prefix': 'mrms-ant', '@primary-color': '#3377FF', '@border-color-base': '#dae2f2' }, javascriptEnabled: true, }, //对应修改生成的 antd 样式类名 chainWebpack(config, { webpack }) { config.plugin('monaco-editor').use(MonacoWebpackPlugin, [ { // 指定需要加载的语言和特性 languages: ['sql', 'javascript', 'typescript'] } ]); }, access: {}, model: {}, initialState: {}, request: {}, layout: { title: '医资管理系统', layout: 'side', menuProps: { theme: 'light', } }, manifest: { basePath: '/', }, publicPath: REACT_APP_ENV == 'dev' ? '/' : '/qualification/', proxy: { '/gateway': { target: 'http://120.27.235.181:5000/gateway',//开发 //target:'http://47.96.149.190:5000/gateway', //演示 changeOrigin: true, // pathRewrite: { '^/gateway': '' }, } }, routes: [ { path: '/', redirect: '/home', }, { path: '*', component: '@/pages/404' }, { path: '/noAccess', component: './noAccess', }, { path: '/home', component: './Home/index', }, ], npmClient: 'yarn', });