.umirc.ts
952 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { defineConfig } from "umi";
import { join } from "path";
import { readdirSync } from "fs";
const getIcons = () => {
const iconDir = join(__dirname, "src/icons");
return readdirSync(iconDir)
.filter(file => file.endsWith(".svg"))
.map(file => `local:${file.replace(/\.svg$/, "")}`);
};
export default defineConfig({
routes: [
{ path: "/", redirect: "/login" },
{ path: "/login", component: "@/routes/login/login" },
{
path: "/indexPage",
component: "@/routes/indexPage",
routes: [{ path: "*" }],
},
{
path: "/loginMobile",
component: "@/routes/mobile/login/LoginMobile",
},
{
path: "/indexMobile",
component: "@/routes/mobile/IndexMobile",
routes: [{ path: "*" }],
},
],
title: "小羚羊EBC前台业务系统",
npmClient: "pnpm",
dva: {},
icons: {
include: getIcons(),
},
plugins: ["@umijs/plugins/dist/dva"],
mfsu: false,
});