React丨Umi defineConfig

  • config.ts
import { defineConfig } from 'umi';
import routes from './routes'
import proxy from './proxy';

export default defineConfig({
    hash: true,
    antd: {},
    dva: {
        hmr: true,
    },
    locale: {
        // default zh-CN
        default: 'zh-CN',
        antd: true,
        // default true, when it is true, will use `navigator.language` overwrite default
        baseNavigator: true,
    },
    targets: {
        ie: 11,
    },
    nodeModulesTransform: {
        type: 'none',
    },
    mfsu: {},
    webpack5: {},
    exportStatic: {},
    // Fast Refresh 热更新
    fastRefresh: {},
    routes,
    proxy,
});
  • 参考
https://umijs.org/config#typescript-%E6%8F%90%E7%A4%BA
posted @ 2021-09-10 14:12  aivsok9  阅读(2032)  评论(0编辑  收藏  举报