包含后厨 团餐 门店分支
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

75 lines
1.9 KiB

  1. // https://umijs.org/config/
  2. import { defineConfig } from 'umi';
  3. import { join } from 'path';
  4. import defaultSettings from './defaultSettings';
  5. import proxy from './proxy';
  6. import routes from './routes';
  7. const { REACT_APP_ENV } = process.env;
  8. export default defineConfig({
  9. hash: true,
  10. antd: {},
  11. dva: {
  12. hmr: true,
  13. },
  14. define: {
  15. 'process.env.UMI_ENV': process.env.UMI_ENV || 'dev',
  16. },
  17. layout: {
  18. // https://umijs.org/zh-CN/plugins/plugin-layout
  19. locale: false,
  20. siderWidth: 208,
  21. ...defaultSettings,
  22. },
  23. // https://umijs.org/zh-CN/plugins/plugin-locale
  24. locale: {
  25. // default zh-CN
  26. default: 'zh-CN',
  27. antd: true,
  28. // default true, when it is true, will use `navigator.language` overwrite default
  29. baseNavigator: true,
  30. },
  31. dynamicImport: {
  32. loading: '@ant-design/pro-layout/es/PageLoading',
  33. },
  34. targets: {
  35. ie: 11,
  36. },
  37. // umi routes: https://umijs.org/docs/routing
  38. routes,
  39. // Theme for antd: https://ant.design/docs/react/customize-theme-cn
  40. theme: {
  41. 'primary-color': defaultSettings.primaryColor,
  42. },
  43. // esbuild is father build tools
  44. // https://umijs.org/plugins/plugin-esbuild
  45. esbuild: {},
  46. title: false,
  47. ignoreMomentLocale: true,
  48. proxy: proxy[REACT_APP_ENV || 'dev'],
  49. manifest: {
  50. basePath: '/',
  51. },
  52. // Fast Refresh 热更新
  53. fastRefresh: {},
  54. openAPI: [
  55. {
  56. requestLibPath: "import { request } from 'umi'",
  57. // 或者使用在线的版本
  58. // schemaPath: "https://gw.alipayobjects.com/os/antfincdn/M%24jrzTTYJN/oneapi.json"
  59. schemaPath: join(__dirname, 'oneapi.json'),
  60. mock: false,
  61. },
  62. {
  63. requestLibPath: "import { request } from 'umi'",
  64. schemaPath: 'https://gw.alipayobjects.com/os/antfincdn/CA1dOm%2631B/openapi.json',
  65. projectName: 'swagger',
  66. },
  67. ],
  68. nodeModulesTransform: {
  69. type: 'none',
  70. },
  71. mfsu: {},
  72. webpack5: {},
  73. exportStatic: {},
  74. });