import { defineConfig } from 'umi';
import defaultSettings,{antdTheme} from './defaultSettings';
import PageRoutes from './router.config'
export default defineConfig({
  hash: true,
  antd: {
  },
  dva: {
    hmr: true,
  },
  locale: {
    default: 'zh-CN',
    antd: true,
    // default true, when it is true, will use `navigator.language` overwrite default
    baseNavigator: true,
  },
  //全局加载样式
  // dynamicImport: {
  //   loading: '@/components/PageLoading/index',
  // },
  targets: {
    ie: 11,
  },
  // umi routes: https://umijs.org/docs/routing
  routes: PageRoutes,
  // Theme for antd: https://ant.design/docs/react/customize-theme-cn
  theme: {
    // ...darkTheme,
    'primary-color': defaultSettings.primaryColor,
    'heading-color': defaultSettings.headingColor,
    'text-color': defaultSettings.textColor,
    // 更改antd 组件颜色
    ...antdTheme
  },
  // @ts-ignore
  title: false,
  ignoreMomentLocale: true,
  manifest: {
    basePath: '/',
  },
});
