修复 pnpm install 报错并补充根路径入口页
- pnpm-workspace.yaml 增加 packages 字段,修复 pnpm 9 的 packages field missing or empty 报错 - 新增 index.html,访问根路径自动跳转到 list.html 排行榜页 - vite.config.ts 构建入口加入 index.html - .gitignore 忽略 .idea,并从暂存区移除已跟踪的 .idea 文件
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,5 +1,6 @@
|
|||||||
node_modules
|
node_modules
|
||||||
dist
|
dist
|
||||||
|
.idea
|
||||||
.DS_Store
|
.DS_Store
|
||||||
*.local
|
*.local
|
||||||
.env
|
.env
|
||||||
|
|||||||
13
index.html
Normal file
13
index.html
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="zh-CN">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta http-equiv="refresh" content="0; url=/list.html" />
|
||||||
|
<script>location.replace('/list.html')</script>
|
||||||
|
<title>Token 排行榜</title>
|
||||||
|
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='8' fill='%23171410'/%3E%3Crect x='6' y='18' width='4' height='8' rx='1' fill='%23ff8a3d'/%3E%3Crect x='14' y='10' width='4' height='16' rx='1' fill='%23ffc27a'/%3E%3Crect x='22' y='6' width='4' height='20' rx='1' fill='%23ffe0b8'/%3E%3C/svg%3E" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
正在跳转到 <a href="/list.html">Token 排行榜</a>……
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -1,2 +1,5 @@
|
|||||||
|
# 单包项目:pnpm 9 要求 workspace 清单必须包含 packages 字段
|
||||||
|
packages:
|
||||||
|
- '.'
|
||||||
allowBuilds:
|
allowBuilds:
|
||||||
esbuild: true
|
esbuild: true
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ export default defineConfig(({ mode }) => {
|
|||||||
build: {
|
build: {
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
input: {
|
input: {
|
||||||
|
index: resolve(__dirname, 'index.html'),
|
||||||
list: resolve(__dirname, 'list.html'),
|
list: resolve(__dirname, 'list.html'),
|
||||||
groups: resolve(__dirname, 'groups.html'),
|
groups: resolve(__dirname, 'groups.html'),
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user