Allow index.preloadInitial to preload the full static closure of the initial bundle (number or "all")
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 58/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- angular, typescript
調査の方向性
Start by reading the implementation and tests for the existing index.preloadInitial boolean option, along with the CLI configuration schema and generated index.html behavior. Trace how the current shallow limit of 10 is applied, then check the option's documentation and tests. Done means numeric values and "all" are accepted, while true keeps its current behavior and generated preload hints match the requested static closure.
索引モデルが issue の本文から書いたものです。
説明
Command
build
Description
#27581 limited modulepreload hints to a shallow set of 10 initial chunks, as a safe default for all applications (#27490). For an application with a deep initial import graph that default costs one network round trip per depth level: the browser only discovers the chunks at depth N after the chunks at depth N-1 have arrived and been parsed.
Our main has a static closure of 45 chunks across six depth levels. We post-process index.html after ng build to preload all of them. Measured in production RUM over three weeks (roughly a million initial loads per week), weekdays before versus after:
| Segment | LCP p75 before | LCP p75 after |
|---|---|---|
| all initial loads | 2.00 s | 1.84 s |
| effective connection type 4g, desktop | 2.07 s | 1.91 s |
| effective connection type 3g, desktop | 7.0 s | 5.3 s |
| effective connection type 2g, desktop | 22.8 s | 14.7 s |
The slowest connections gained the most, which is the opposite of what the HTTP Archive correlation cited in #27490 would predict. That correlation covers preloads of any resource. Chunks in the entry point's static closure are all required before the application can execute at all, so preloading them does not compete with anything more critical than the stylesheet.
Describe the solution you'd like
Let index.preloadInitial accept a number or "all" in addition to the current boolean, keeping true as today's shallow-10 behaviour. That would let us delete a post-build script that has to track the CLI's index.html output, and which broke on the integrity attributes added in 22.x.
Describe alternatives you've considered
Post-processing index.html (what we do now); setting preloadInitial: false and writing every hint ourselves (same fragility); eager-loading the landing route into the main bundle (adds 330 KB gzipped to every first load for the 70% of visits that land elsewhere).
- 主要言語
- TypeScript
- スター
- 27k
- フォーク
- 11.8k
- 平均マージ
- 1日 2時間
- マージ済み PR(30日)
- 292
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
angular/angular-cli のほかの issue
-
Can't use an array of hostnames in --allowedHosts cli parameter in @angular/build:dev-server対応中かも @alan-agius4 が 1 日前に担当しました。 オープンarea: @angular/build gemini-triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
angular/angular-cli#33955 ·
メンテナーはふだん 1 日以内に返信
-
@angular/build: source-map comment scanner corrupts valid JS containing a regex literal対応中かも @alan-agius4 が 1 日前に担当しました。 オープンarea: @angular/build
難易度 3/5 1〜2日 初心者へのやさしさ 76/100
angular/angular-cli#34590 ·
メンテナーはふだん 1 日以内に返信
-
build: ERR_REQUIRE_CYCLE_MODULE when loading oxc-parser in StackBlitz / WebContainer対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンarea: @angular/build
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
angular/angular-cli#34524 · コメント 5 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Tailwind CSS v4 classes in new or moved files are not picked up by ng serve until another rebuild対応中かも @MeAkib が 10 日前に担当しました。 オープンarea: @angular/build
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
angular/angular-cli#34446 ·
メンテナーはふだん 1 日以内に返信
-
Follow-up to issue: SSR: Add a way to configure externalDependencies for the server bundle onlyオープンarea: @angular/build
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
angular/angular-cli#34262 ·
メンテナーはふだん 1 日以内に返信
angular/angular-cli の issue をすべて見る
似ている issue
-
Add: Disco Mix SDオープンcheck:passed streams:add
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
level2 nsoc26
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
GauravKarakoti/SecureFlow#1488 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
deltachat/deltachat-desktop#6914 ·
メンテナーはふだん 2 日以内に返信
-
area:cli bug P4
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
bug from-studio
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
esengine/DeepSeek-Reasonix#14868 ·
メンテナーはふだん 1 日以内に返信