.umirc.ts
679 Bytes
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: "*" }],
},
],
npmClient: "pnpm",
dva: {},
icons: {
include: getIcons(),
},
plugins: ["@umijs/plugins/dist/dva"],
});