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.
83 lines
1.6 KiB
83 lines
1.6 KiB
// 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',
|
|
},
|
|
},
|
|
],
|
|
[
|
|
'umi-plugin-pro-block',
|
|
{
|
|
moveMock: false,
|
|
moveService: false,
|
|
modifyRequest: true,
|
|
autoAddMenu: true,
|
|
},
|
|
],
|
|
],
|
|
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,
|
|
},
|
|
};
|
|
|