1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- // https://umijs.org/config/
- import { defineConfig } from 'umi';
- import defaultSettings from './defaultSettings';
- import proxy from './proxy';
- import routes from './routes';
- const { REACT_APP_ENV } = process.env;
- export default defineConfig({
- hash: true,
- antd: {},
- dva: {
- hmr: true,
- },
- layout: {
- name: 'Ant Design Pro',
- locale: false,
- siderWidth: 208,
- ...defaultSettings,
- },
- locale: {
- // default zh-CN
- default: 'zh-CN',
- antd: false,
- // default true, when it is true, will use `navigator.language` overwrite default
- baseNavigator: true,
- },
- dynamicImport: {
- loading: '@ant-design/pro-layout/es/PageLoading',
- },
- targets: {
- ie: 11,
- },
- // umi routes: https://umijs.org/docs/routing
- routes,
- // Theme for antd: https://ant.design/docs/react/customize-theme-cn
- theme: {
- 'primary-color': defaultSettings.primaryColor,
- },
- esbuild: {},
- title: false,
- ignoreMomentLocale: true,
- proxy: proxy[REACT_APP_ENV || 'dev'],
- manifest: {
- basePath: '/',
- },
- // https://github.com/zthxxx/react-dev-inspector
- plugins: ['react-dev-inspector/plugins/umi/react-inspector'],
- inspectorConfig: {
- // loader options type and docs see below
- exclude: [],
- babelPlugins: [],
- babelOptions: {},
- },
- resolve: {
- includes: ['src/components'],
- },
- });
|