12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- import { defineConfig } from 'umi';
- import { join } from 'path';
- import proxy from './proxy';
- import routes from './routes';
- const { REACT_APP_ENV } = process.env;
- console.log('env', REACT_APP_ENV);
- export default defineConfig({
- hash: true,
- antd: {},
- dva: {
- hmr: true,
- },
-
-
-
-
-
-
- layout: false,
-
- locale: {
-
- default: 'zh-CN',
- antd: true,
-
- baseNavigator: true,
- },
- dynamicImport: {
- loading: '@ant-design/pro-layout/es/PageLoading',
- },
- targets: {
- ie: 11,
- },
-
- routes,
-
- theme: {
- 'root-entry-name': 'variable',
- },
-
-
- esbuild: {},
- title: false,
- ignoreMomentLocale: true,
- base: '/sgadmin/',
- publicPath: REACT_APP_ENV === 'pro' ? '/sgadmin/' : '/',
- outputPath: 'dist/sgadmin',
- proxy: proxy[REACT_APP_ENV || 'dev'],
- manifest: {
- basePath: '/sgadmin',
- },
-
- fastRefresh: {},
- openAPI: [
- {
- requestLibPath: "import { request } from 'umi'",
-
-
- schemaPath: join(__dirname, 'oneapi.json'),
- mock: false,
- },
- {
- requestLibPath: "import { request } from 'umi'",
- schemaPath: 'https://gw.alipayobjects.com/os/antfincdn/CA1dOm%2631B/openapi.json',
- projectName: 'swagger',
- },
- ],
- nodeModulesTransform: { type: 'none' },
- mfsu: {},
- webpack5: {},
- exportStatic: {},
- });
|