// ref: https://umijs.org/config/ import { primaryColor } from '../src/defaultSettings'; export default { plugins: [ [ 'umi-plugin-react', { antd: true, dva: { hmr: true, }, targets: { ie: 11, }, locale: { enable: true, // default false default: 'zh-CN', // default zh-CN baseNavigator: true, // default true, when it is true, will use `navigator.language` overwrite default }, dynamicImport: { loadingComponent: './components/PageLoading/index', }, }, ], ], targets: { ie: 11, }, /** * 路由相关配置 */ routes: [ { path: '/user', components: ['../layouts/UserLayout'], routes: [], }, { path: '/', component: '../layouts/BasicLayout', routes: [ // dashboard { path: '/', name: 'dashboard', icon: 'dashboard', component: './BasicDemo', }, ], }, ], disableRedirectHoist: true, /** * webpack 相关配置 */ define: { APP_TYPE: process.env.APP_TYPE || '', }, // Theme for antd // https://ant.design/docs/react/customize-theme-cn theme: { 'primary-color': primaryColor, }, externals: { '@antv/data-set': 'DataSet', }, ignoreMomentLocale: true, lessLoaderOptions: { javascriptEnabled: true, }, };