123456789101112131415161718192021222324252627282930313233343536373839404142 |
- // https://umijs.org/config/
- import { defineConfig } from 'umi';
- import defaultSettings from './defaultSettings';
- import proxy from './proxy';
- import routeCofig from './routeConfig'
- const { REACT_APP_ENV } = process.env;
- export default defineConfig({
- hash: true,
- antd: {},
- dva: {
- hmr: true,
- },
- locale: {
- // default zh-CN
- default: 'zh-CN',
- // default true, when it is true, will use `navigator.language` overwrite default
- antd: true,
- baseNavigator: false,
- },
- // dynamicImport: {
- // loading: '@/components/PageLoading/index',
- // },
- targets: {
- ie: 11,
- },
- // umi routes: https://umijs.org/docs/routing
- routes: routeCofig,
- // Theme for antd: https://ant.design/docs/react/customize-theme-cn
- theme: {
- // ...darkTheme,
- 'primary-color': defaultSettings.primaryColor,
- },
- // @ts-ignore
- title: false,
- ignoreMomentLocale: true,
- proxy: proxy[REACT_APP_ENV || 'dev'],
- manifest: {
- basePath: '/',
- },
- });
|