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:
+1
-5
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user