-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Commit 2085365
fix(@angular/build): only generate shallow preload links for initial files
To remove the potential for a large amount of modulepreload link elements being added
to the generating `index.html` for an application, the number of elements is now limited
to three. Also, only first-level initial scripts will be added. Previously all initial
scripts regardless of depth were eligible for preloading. The preload generation can
still be fully disabled via the `index.preloadInitial` option within the build options.
(cherry picked from commit 82e9e68)1 parent f683839 commit 2085365
File tree
2 files changed
+31
-6
lines changed- packages/angular/build/src/tools/esbuild
2 files changed
+31
-6
lines changedLines changed: 17 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
43 | 43 |
| |
44 | 44 |
| |
45 | 45 |
| |
46 | + | ||
46 | 47 |
| |
47 | 48 |
| |
48 | 49 |
| |
| |||
298 | 299 |
| |
299 | 300 |
| |
300 | 301 |
| |
302 | + | ||
301 | 303 |
| |
302 | 304 |
| |
303 | 305 |
| |
| |||
308 | 310 |
| |
309 | 311 |
| |
310 | 312 |
| |
311 | - | ||
312 | - | ||
313 | - | ||
314 | - | ||
313 | + | ||
314 | + | ||
315 | + | ||
316 | + | ||
317 | + | ||
318 | + | ||
319 | + | ||
320 | + | ||
321 | + | ||
322 | + | ||
323 | + | ||
324 | + | ||
325 | + | ||
315 | 326 |
| |
316 | 327 |
| |
317 | 328 |
| |
| |||
321 | 332 |
| |
322 | 333 |
| |
323 | 334 |
| |
335 | + | ||
324 | 336 |
| |
325 | 337 |
| |
326 | 338 |
| |
327 | 339 |
| |
328 | 340 |
| |
329 | 341 |
| |
330 | 342 |
| |
331 | - | ||
343 | + | ||
332 | 344 |
| |
333 | 345 |
| |
334 | 346 |
| |
|
Lines changed: 14 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
15 | + | ||
16 | + | ||
17 | + | ||
18 | + | ||
19 | + | ||
20 | + | ||
15 | 21 |
| |
16 | 22 |
| |
17 | 23 |
| |
| |||
39 | 45 |
| |
40 | 46 |
| |
41 | 47 |
| |
48 | + | ||
42 | 49 |
| |
43 | 50 |
| |
44 | 51 |
| |
45 | 52 |
| |
46 | 53 |
| |
47 | 54 |
| |
48 | - | ||
55 | + | ||
56 | + | ||
57 | + | ||
58 | + | ||
59 | + | ||
60 | + | ||
61 | + | ||
49 | 62 |
| |
50 | 63 |
| |
51 | 64 |
| |
|
0 commit comments