Skip to content

Commit 1ab4430

Browse files
committed
fix: 添加public目录(React项目必需)
�� 修复问题: - 取消忽略 public/ 目录 - 添加 public/index.html 到仓库 - 修正 .gitignore 配置 📝 说明: - public/ 目录包含 index.html,是React应用的入口 - Gatsby 项目会忽略 public/,但 Create React App 项目需要它 - .env 文件保持忽略状态(仅用于本地开发)
1 parent 6594e17 commit 1ab4430

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ out/
7474

7575
# Gatsby
7676
.cache/
77-
public/
77+
# public/ # 注释掉,React项目需要public目录
7878

7979
# Debug
8080
npm-debug.log*

public/index.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html lang="zh-CN">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1" />
6+
<meta name="theme-color" content="#1a1a1a" />
7+
<meta
8+
name="description"
9+
content="LeetCode 56 - 合并区间 的算法可视化"
10+
/>
11+
<title>LeetCode 56 - 合并区间</title>
12+
</head>
13+
<body>
14+
<noscript>You need to enable JavaScript to run this app.</noscript>
15+
<div id="root"></div>
16+
</body>
17+
</html>

0 commit comments

Comments
 (0)