Commit 19455d8
committed
refactor(@angular/build): lazy load sourcemap remapping in i18n inliner worker
Previously, `@ampproject/remapping` was statically imported at the top level
of `i18n-inliner-worker.ts`, eagerly pulling in 5 packages
(`@ampproject/remapping` and 4 sub-dependencies) upon worker initialization.
In typical workflows or when sourcemaps are not requested for inlining,
remapping is never executed.
This changes the import of `@ampproject/remapping` to be dynamic so that
it is only loaded when a file actually requires sourcemap remapping.1 parent c51efda commit 19455d8
1 file changed
Lines changed: 4 additions & 1 deletion
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| 159 | + | |
| 160 | + | |
159 | 161 | | |
160 | 162 | | |
161 | 163 | | |
| |||
557 | 559 | | |
558 | 560 | | |
559 | 561 | | |
| 562 | + | |
560 | 563 | | |
561 | 564 | | |
562 | 565 | | |
| |||
0 commit comments