123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- import * as path from 'path';
- import { IConfig } from 'umi-types';
-
- // ref: https://umijs.org/config/
- const config: IConfig = {
- history: 'hash',
- treeShaking: true,
- disableGlobalVariables: true,
- "define": {
- "process.env.API_ENV": "development"
- },
- devtool: 'cheap-module-eval-source-map',
- plugins: [
- // ref: https://umijs.org/plugin/umi-plugin-react.html
- ['umi-plugin-react', {
- antd: true,
- dva: {
- immer: true
- },
- dynamicImport: false,
- title: 'game_name',
- dll: false,
- locale: {
- default: 'zh-CN', //默认语言 zh-CN
- baseNavigator: true, // 为true时,用navigator.language的值作为默认语言
- antd: true, // 是否启用antd的<LocaleProvider />
- },
- routes: {
- exclude: [
- /models\//,
- /services\//,
- /model\.(t|j)sx?$/,
- /service\.(t|j)sx?$/,
- /components\//,
- ],
- },
- }],
- ],
- routes: [
- {
- path: '/',
- component: '../layouts/index',
- routes: [
- { path: '/', component: './main' },
- { path: '/main', component: './main' },
- { path: '/game', component: './game' },
- { path: '/rank', component: './rank' },
- ],
- },
- ],
- }
-
- export default config;
|