Commit 255cb72
committed
refactor(@angular/build): lazy load sourcemap remapping in js transform worker
Previously, `@ampproject/remapping` was statically imported at the top level
of `javascript-transformer-worker.ts`, eagerly pulling in 5 packages
(`@ampproject/remapping` and 4 sub-dependencies) upon worker initialization.
In standard Angular CLI configurations (`ng build` and `ng serve`), vendor
sourcemaps are disabled by default (`thirdPartySourcemaps = false`), causing
`useInputSourcemap` to evaluate to false for all transformed `node_modules`
files. As a result, sourcemap remapping is never executed in typical builds.1 parent 999d84c commit 255cb72
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 | | |
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
| |||
253 | 255 | | |
254 | 256 | | |
255 | 257 | | |
| 258 | + | |
256 | 259 | | |
257 | 260 | | |
258 | 261 | | |
| |||
0 commit comments