12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- // https://umijs.org/config/
- import { defineConfig } from 'umi';
- import defaultSettings from './defaultSettings';
- import proxy from './proxy';
- import routes from './routes';
- import darkTheme from '@ant-design/dark-theme';
- const { REACT_APP_ENV } = process.env;
- export default defineConfig({
- hash: true,
- antd: {
- dark: true,// 暗黑模式
- compact: true, // 紧凑模式
- },
- dva: {
- hmr: true,
- },
- layout: {
- name: '科德管理系统',
- 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: false,
- },
- dynamicImport: {
- loading: '@ant-design/pro-layout/es/PageLoading',
- },
- history: { type: 'hash' },
- publicPath: '/static/',
- targets: {
- ie: 11,
- },
- // umi routes: https://umijs.org/docs/routing
- routes,
- // Theme for antd: https://ant.design/docs/react/customize-theme-cn
- theme: {
- // ...darkTheme,
- // black: '#f00',//内容区背景颜色
- // 'popover-background': '#ff0',//侧边栏背景颜色
- // 'component-background': '#fff',//内容容器(比如搜索栏)背景颜色
- // 'table-header-bg': '#fff',//表格头部颜色
- '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'],
- },
- });
|