Commit 21b8fc0
committed
fix(@angular/build): ensure import map integrity keys are valid URL-like specifiers
In import maps, the keys for the integrity map must be valid URL-like
specifiers (either absolute URLs, or relative URLs starting with /, ./, or ../).
If a key is a bare filename like chunk-SYbG1sRo.js, the browser ignores it with a warning.
We now prepend ./ to relative paths in the integrity map keys if they do not
start with a slash, dot-slash, or protocol, resolving browser warning issues
when subresource integrity is enabled for dynamically loaded chunks.
Fixes #336171 parent 80edac5 commit 21b8fc0Copy full SHA for 21b8fc0
3 files changed
+15-5Lines changed: 15 additions & 5 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- packages/angular/build/src
- builders/application/tests/options
- utils/index-file
Expand file treeCollapse file tree
Open diff view settings
Collapse file
packages/angular/build/src/builders/application/tests/options/subresource-integrity_spec.ts
Copy file name to clipboardExpand all lines: packages/angular/build/src/builders/application/tests/options/subresource-integrity_spec.ts+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
200 | 200 | |
201 | 201 | |
202 | 202 | |
203 | | - |
| 203 | + |
204 | 204 | |
205 | 205 | |
206 | 206 | |
|
Collapse file
packages/angular/build/src/utils/index-file/augment-index-html.ts
Copy file name to clipboardExpand all lines: packages/angular/build/src/utils/index-file/augment-index-html.ts+11-1Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
11 | 11 | |
12 | 12 | |
13 | 13 | |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
14 | 20 | |
15 | 21 | |
16 | 22 | |
| ||
168 | 174 | |
169 | 175 | |
170 | 176 | |
171 | | - |
| 177 | + |
| 178 | + |
| 179 | + |
172 | 180 | |
173 | 181 | |
174 | 182 | |
| ||
268 | 276 | |
269 | 277 | |
270 | 278 | |
| 279 | + |
271 | 280 | |
272 | 281 | |
273 | 282 | |
| 283 | + |
274 | 284 | |
275 | 285 | |
276 | 286 | |
|
Collapse file
packages/angular/build/src/utils/index-file/augment-index-html_spec.ts
Copy file name to clipboardExpand all lines: packages/angular/build/src/utils/index-file/augment-index-html_spec.ts+3-3Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
468 | 468 | |
469 | 469 | |
470 | 470 | |
471 | | - |
472 | | - |
| 471 | + |
| 472 | + |
473 | 473 | |
474 | | - |
| 474 | + |
475 | 475 | |
476 | 476 | |
477 | 477 | |
|
0 commit comments