config.ts 976 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // https://umijs.org/config/
  2. import { defineConfig } from 'umi';
  3. import defaultSettings from './defaultSettings';
  4. import proxy from './proxy';
  5. import routeCofig from './routeConfig'
  6. const { REACT_APP_ENV } = process.env;
  7. export default defineConfig({
  8. hash: true,
  9. antd: {},
  10. dva: {
  11. hmr: true,
  12. },
  13. locale: {
  14. // default zh-CN
  15. default: 'zh-CN',
  16. // default true, when it is true, will use `navigator.language` overwrite default
  17. antd: true,
  18. baseNavigator: false,
  19. },
  20. // dynamicImport: {
  21. // loading: '@/components/PageLoading/index',
  22. // },
  23. targets: {
  24. ie: 11,
  25. },
  26. // umi routes: https://umijs.org/docs/routing
  27. routes: routeCofig,
  28. // Theme for antd: https://ant.design/docs/react/customize-theme-cn
  29. theme: {
  30. // ...darkTheme,
  31. 'primary-color': defaultSettings.primaryColor,
  32. },
  33. // @ts-ignore
  34. title: false,
  35. ignoreMomentLocale: true,
  36. proxy: proxy[REACT_APP_ENV || 'dev'],
  37. manifest: {
  38. basePath: '/',
  39. },
  40. });