Built-In Font Optimization: Improve Angular Performance & Core Web Vitals
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Feature
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- angular, typescript
- Bereich
- cli, frontend, performance
Rechercherichtung
Beginne mit der Überprüfung der an der Build-Zeit-Font-Verarbeitung beteiligten Bereiche @angular/core und @angular/cli und vergleiche das vorgeschlagene Verhalten mit Next.js next/font. Definiere die unterstützten Font-Identifier, den Ablauf für den Download zur Build-Zeit und das Self-Hosting sowie das Verhalten von Preconnect, Preload und size-adjust, bevor du mit der Implementierung beginnst. Als erledigt gilt die Aufgabe, wenn das Feature für Google Fonts funktioniert und die genannten Ziele hinsichtlich Ladezeit und Layout-Shift verbessert.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Which @angular/* package(s) are relevant/related to the feature request?
@angular/core and @angular/cli
Problems :
-
Using custom fonts from Google Fonts can significantly impact FCP, LCP and initial load performance in Angular applications.
-
Downloading fonts from Google servers adds extra HTTP requests and latency, slowing down initial paint times.
-
The font swapping has the potential to cause layout shifts and so impact Cumulative Layout Shift (CLS).
Proposed Solution :
-
Introduce a built-in mechanism in Angular to automatically downloads fonts specified by their Google Fonts names (or similar identifiers) during the build process and self-host fonts within the application, eliminating the need for external font services like Google Fonts.
-
Utilize preconnect, preload, and size-adjust for optimal performance and seamless font rendering.
Benefits :
-
Improved Performance: Reduces reliance on external requests, minimizes layout shifts (thanks to the underlying CSS size-adjust) , and enables efficient caching.
-
Improved FCP and LCP: Optimized fonts and proactive loading strategies contribute to significantly faster loading times and smoother user experiences.
-
Enhanced SEO: Better Core Web Vitals can lead to higher search engine ranking and increased website traffic.
-
Enhanced Security: Minimizes exposure to external vulnerabilities and provides more control over font sources.
-
Developer Experience: Built-in font optimization in Angular improves developer experience.
Alternatives considered
Anyone interested is welcome to comment on what the proposed syntax and feature set will be.
Inspired by next.js automatic font self-hosting library ( next/font )
- Vorherrschende Sprache
- TypeScript
- Sterne
- 27k
- Forks
- 11.8k
- Ø Merge
- 17 Std. 25 Min.
- Gemergte PRs (30 T.)
- 183
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus angular/angular-cli
-
area: @angular/build gemini-triaged
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
angular/angular-cli#33955 ·
-
area: @angular/cli gemini-triaged
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
angular/angular-cli#33055 · 1 Kommentar · 3 Reaktionen ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34131 · 1 zugewiesene Person ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34130 · 1 zugewiesene Person ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34128 · 1 zugewiesene Person ·
Alle Issues in angular/angular-cli
Ähnliche Issues
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
-
Mend: dependency security vulnerability untriaged
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100