1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- /*
- * @Author: your name
- * @Date: 2021-09-03 14:28:27
- * @LastEditTime: 2024-09-06 16:42:12
- * @LastEditors: code4eat awesomedema@gmail.com
- * @Description: In User Settings Edit
- * @FilePath: /MedicalWisdomCheckSys/config/config.ts
- */
- // https://umijs.org/config/
- import { defineConfig } from 'umi';
- import { join } from 'path';
- import defaultSettings from './defaultSettings';
- import proxy from './proxy';
- import routes from './routes';
- const { REACT_APP_ENV } = process.env;
- console.log({'REACT_APP_ENV_pfmview':REACT_APP_ENV});
- export default defineConfig({
- hash: true,
- antd:{
- config:{
- prefixCls: 'mwc-ant',
- // getPopupContainer:(triggerNode:HTMLElement)=>triggerNode
- }
- },
- lessLoader: {
- modifyVars: { '@ant-prefix': 'mwc-ant' }
- }, //对应修改生成的 antd 样式类名
- dva: {
- hmr: true,
- },
- layout: {
- // https://umijs.org/zh-CN/plugins/plugin-layout
- locale: false,
- siderWidth: 208,
- ...defaultSettings,
- },
- dynamicImport: {
- loading: '@ant-design/pro-layout/es/PageLoading',
- },
- targets: {
- ie: 11,
- },
- routes,
- theme: {
- 'primary-color': defaultSettings.primaryColor,
- '@ant-prefix': 'mwc-ant'
- },
- // esbuild is father build tools
- // https://umijs.org/plugins/plugin-esbuild
- esbuild: {},
- title: false,
- ignoreMomentLocale: true,
- // proxy: proxy[REACT_APP_ENV || 'dev'],
- manifest: {
- basePath: '/',
- },
- publicPath: REACT_APP_ENV == 'development' ? '/' : '/pfmview/',
- autoprefixer:{
- },
- // Fast Refresh 热更新
- fastRefresh: {},
- openAPI: [
- {
- requestLibPath: "import { request } from 'umi'",
- // 或者使用在线的版本
- // schemaPath: "https://gw.alipayobjects.com/os/antfincdn/M%24jrzTTYJN/oneapi.json"
- schemaPath: join(__dirname, 'oneapi.json'),
- mock: false,
- },
- {
- requestLibPath: "import { request } from 'umi'",
- schemaPath: 'https://gw.alipayobjects.com/os/antfincdn/CA1dOm%2631B/openapi.json',
- projectName: 'swagger',
- },
- ],
- nodeModulesTransform: { type: 'none' },
- // mfsu: {
- // // production: { output: '.mfsu-production' }
- // },
- // webpack5: {
- // },
- exportStatic: {},
- qiankun: {
- slave: {},
- },
- });
|