Built-In Font Optimization: Improve Angular Performance & Core Web Vitals
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- angular, typescript
- Lĩnh vực
- cli, frontend, performance
Hướng nghiên cứu
Bắt đầu bằng cách xem xét các khu vực của @angular/core và @angular/cli liên quan đến việc xử lý font trong thời gian build, đồng thời so sánh hành vi được đề xuất với Next.js next/font. Xác định các định danh font được hỗ trợ, quy trình tải xuống và self-hosting trong thời gian build, cũng như hành vi của preconnect, preload và size-adjust trước khi triển khai. Được xem là hoàn tất khi tính năng hoạt động với Google Fonts và cải thiện các mục tiêu đã nêu về thời gian tải và layout shift.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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 )
- Ngôn ngữ chính
- TypeScript
- Star
- 27k
- Fork
- 11.8k
- Merge trung bình
- 16 giờ 35 phút
- Pull request đã merge (30 ngày)
- 176
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của angular/angular-cli
-
Can't use an array of hostnames in --allowedHosts cli parameter in @angular/build:dev-server Đang mởarea: @angular/build gemini-triaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
angular/angular-cli#33955 ·
-
area: @angular/cli gemini-triaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
angular/angular-cli#33055 · 1 bình luận · 3 reaction ·
-
unit-test: with --coverage, a setup file's hooks reach only the first spec file of each worker Đang mởarea: @angular/build gemini-triaged
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 72/100
angular/angular-cli#34137 ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34131 · 1 người được giao ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34130 · 1 người được giao ·
Tất cả issue của angular/angular-cli
Issue tương tự
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
dennys-bd/agent-hive#184 ·
-
Add: hunch Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
AbdelStark/awesome-typesafe#104 ·
-
ai-observability bug team/ai-observability
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
vicharanashala/fln#563 ·