perf(web): self-host Font Awesome instead of cdnjs CDN

Replace the external cdnjs.cloudflare.com <link> with a bundled
npm import so FA CSS+fonts ship as static assets through the
same Cloudflare CDN that serves the app — eliminates an extra
DNS lookup and third-party CDN dependency, improves reliability
for China users.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
yuanzonghao
2026-06-19 01:33:40 +08:00
parent f8cfa90d4c
commit 05a5251658
4 changed files with 12 additions and 6 deletions
+1 -5
View File
@@ -5,6 +5,7 @@ import { Analytics } from "@/components/Analytics";
import { LOCALES, DEFAULT_LOCALE, type Locale } from "@/lib/i18n/config";
import { localePath } from "@/lib/i18n/navigation";
import { stripLocalePrefix } from "@/lib/i18n/navigation";
import "@fortawesome/fontawesome-free/css/all.min.css";
import "./globals.css";
// Editorial fonts: drive tailwind `font-serif`/`font-sans` via
@@ -61,11 +62,6 @@ export default async function RootLayout({
suppressHydrationWarning
>
<head>
{/* Font Awesome — fa-solid icons used by home, /play, /new, CustomForm. */}
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"
/>
{LOCALES.map((l) => (
<link
key={l}