feat: 1-模板约定
This commit is contained in:
parent
972da85a63
commit
2e2518e1d5
6
.idea/vcs.xml
Normal file
6
.idea/vcs.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
14
.umirc.ts
14
.umirc.ts
@ -1,14 +0,0 @@
|
||||
import { defineConfig } from 'umi';
|
||||
|
||||
export default defineConfig({
|
||||
nodeModulesTransform: {
|
||||
type: 'none',
|
||||
},
|
||||
routes: [
|
||||
{ path: '/', component: '@/pages/index' },
|
||||
],
|
||||
fastRefresh: {},
|
||||
history: {
|
||||
type: 'hash'
|
||||
},
|
||||
});
|
23
config/config.ts
Normal file
23
config/config.ts
Normal file
@ -0,0 +1,23 @@
|
||||
import { defineConfig } from 'umi';
|
||||
|
||||
export default defineConfig({
|
||||
nodeModulesTransform: {
|
||||
type: 'none', // all 慢 兼容好
|
||||
},
|
||||
routes: [
|
||||
{ path: '/', component: '@/pages/index' },
|
||||
{ path: '/about', component: '@/pages/about' },
|
||||
],
|
||||
fastRefresh: {},
|
||||
history: {
|
||||
type: 'browser'
|
||||
},
|
||||
// 后续设置的配置
|
||||
devServer: {
|
||||
port: 3000, // 启动端口
|
||||
},
|
||||
title: 'UmiV3',// 网站标题
|
||||
favicon: '/favicon.ico',// 网站图标
|
||||
dynamicImport: {}, // 按需加载
|
||||
mountElementId: 'root', // 指定 reactapp 渲染到元素的根元素 id
|
||||
});
|
BIN
public/favicon.ico
Normal file
BIN
public/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 216 KiB |
4
src/global.less
Normal file
4
src/global.less
Normal file
@ -0,0 +1,4 @@
|
||||
body, html {
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
}
|
11
src/pages/document.ejs
Normal file
11
src/pages/document.ejs
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
|
||||
<link rel="stylesheet" href="/umi.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script src="/umi.js"></script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user