Repository navigation
Commit 9bc35b1
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 36bdd84 commit 9bc35b1
1 file changed
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 | | |
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| 154 | + | |
| 155 | + | |
154 | 156 | | |
155 | 157 | | |
156 | 158 | | |
| |||
542 | 544 | | |
543 | 545 | | |
544 | 546 | | |
| 547 | + | |
545 | 548 | | |
546 | 549 | | |
547 | 550 | | |
| |||
0 commit comments