This commit is contained in:
liuhanhua
2025-12-01 10:09:46 +08:00
parent 6cdc748f9e
commit f8069035a8
21 changed files with 4006 additions and 103 deletions

View File

@@ -1,9 +1,9 @@
import { defineConfig } from "umi";
import { defineConfig } from "@umijs/max";
export default defineConfig({
routes: [
{ path: "/", component: "index" },
{ path: "/docs", component: "docs" },
],
npmClient: 'yarn',
// 最小化有效配置
history: { type: 'hash' },
plugins: [],
// 禁用MFSU功能
mfsu: false,
});

12
config/proxy.js Normal file
View File

@@ -0,0 +1,12 @@
const proxy = {
'/api': {
'target': 'http://jsonplaceholder.typicode.com/',
'changeOrigin': true,
'pathRewrite': { '^/api' : '' },
},
}
export default proxy;

12
config/routes.js Normal file
View File

@@ -0,0 +1,12 @@
// 简化的路由配置
const routes = [
{ path: '/', component: './index' },
{ path: '/login', component: './login' },
{ path: '/docs', component: './docs' },
// 404 页面
{ path: '/*', component: './404' },
];
export default routes;