import { defineConfig } from '../src/utils/umiExport'; import theme from './theme'; import routes from './routes'; import proxy from './proxy'; const { NODE_ENV } = process.env; const isDev: boolean = NODE_ENV === 'development' const devConfig = { targets: { chrome: 87 }, proxy, fastRefresh: true, } const proConfig = { publicPath: './', } const baseConfig: any = { theme, routes, antd: { import: false, }, // dva: {}, history: { type: 'hash', }, access: {}, srcTranspiler: 'babel', model: {}, mfsu: false, initialState: {}, request: { dataField: 'data' }, npmClient: 'npm', ...(isDev ? devConfig : proConfig) } export default defineConfig(baseConfig);