init
This commit is contained in:
@@ -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
12
config/proxy.js
Normal 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
12
config/routes.js
Normal 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;
|
||||
Reference in New Issue
Block a user