Built-In Font Optimization: Improve Angular Performance & Core Web Vitals
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- angular, typescript
- 領域
- cli, frontend, performance
調査の方向性
まず、ビルド時のフォント処理に関係する @angular/core と @angular/cli の領域を確認し、提案されている動作を Next.js next/font と比較してください。実装前に、サポートするフォント識別子、ビルド時のダウンロードとセルフホスティングのフロー、および preconnect、preload、size-adjust の動作を定義してください。Google Fonts で機能が動作し、提示された読み込みとレイアウトシフトの目標が改善されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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 )
- 主要言語
- TypeScript
- スター
- 27k
- フォーク
- 11.8k
- 平均マージ
- 16時間 35分
- マージ済み PR(30日)
- 176
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
angular/angular-cli のほかの issue
-
area: @angular/build gemini-triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
angular/angular-cli#33955 ·
-
area: @angular/cli gemini-triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
angular/angular-cli#33055 · コメント 1 件 · リアクション 3 件 ·
-
area: @angular/build gemini-triaged
難易度 4/5 3〜5日 初心者へのやさしさ 72/100
angular/angular-cli#34137 ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34131 · 担当者 1 名 ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34130 · 担当者 1 名 ·
angular/angular-cli の issue をすべて見る
似ている issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
dennys-bd/agent-hive#184 ·
-
Add: hunch オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
AbdelStark/awesome-typesafe#104 ·
-
ai-observability bug team/ai-observability
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
vicharanashala/fln#563 ·