Просмотр исходного кода

fix(web): 撤掉 @fontsource 依赖,衬线标题回退系统宋体(国内 npmmirror 无 5.2.9 版本致构建失败)

国内 registry=npmmirror 未同步 @fontsource/noto-serif-sc@5.2.9(ETARGET)→ 构建失败、8101 down。
改:移除 npm 字体依赖,--font-serif 走 'Songti SC'/系统宋体兜底(暖调+衬线标题观感保留)。
思源宋体改用 vendoring(public 内放 woff2)后续单独做。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sam Lee 2 недель назад
Родитель
Сommit
0f441b11c6
3 измененных файлов с 0 добавлено и 14 удалено
  1. 0 3
      web2/app/layout.tsx
  2. 0 10
      web2/package-lock.json
  3. 0 1
      web2/package.json

+ 0 - 3
web2/app/layout.tsx

@@ -1,7 +1,4 @@
 import type { Metadata } from "next";
-// 思源宋体(自托管,不依赖 Google Fonts,国内可达);按 unicode-range 分片,浏览器只取标题用到的字形。
-import "@fontsource/noto-serif-sc/400.css";
-import "@fontsource/noto-serif-sc/600.css";
 import "./globals.css";
 
 export const metadata: Metadata = {

+ 0 - 10
web2/package-lock.json

@@ -8,7 +8,6 @@
       "name": "content-find-agent-web2",
       "version": "0.1.0",
       "dependencies": {
-        "@fontsource/noto-serif-sc": "^5.2.9",
         "lucide-react": "^0.468.0",
         "next": "^15.1.0",
         "react": "^19.0.0",
@@ -31,15 +30,6 @@
         "tslib": "^2.4.0"
       }
     },
-    "node_modules/@fontsource/noto-serif-sc": {
-      "version": "5.2.9",
-      "resolved": "https://registry.npmjs.org/@fontsource/noto-serif-sc/-/noto-serif-sc-5.2.9.tgz",
-      "integrity": "sha512-+wosdNmyrtRjnqJ/4A6i99jApm6ye34n8Nh7jUO3P/+6Hd1ZBY1gB9yGaI5jVxb56RS1lM2kTc0DzX1ifRO2MA==",
-      "license": "OFL-1.1",
-      "funding": {
-        "url": "https://github.com/sponsors/ayuhito"
-      }
-    },
     "node_modules/@img/colour": {
       "version": "1.1.0",
       "resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.1.0.tgz",

+ 0 - 1
web2/package.json

@@ -8,7 +8,6 @@
     "build": "next build"
   },
   "dependencies": {
-    "@fontsource/noto-serif-sc": "^5.2.9",
     "lucide-react": "^0.468.0",
     "next": "^15.1.0",
     "react": "^19.0.0",