Skip to content

Commit 6876ad3

Browse files
alan-agius4dgp1130
authored andcommittedJan 11, 2022
fix(@angular-devkit/build-angular): use contenthash instead of chunkhash for chunks
See https://github.com/waysact/webpack-subresource-integrity/tree/main/webpack-subresource-integrity#caching and waysact/webpack-subresource-integrity#162 for more information about this. Closes #22439 (cherry picked from commit 11f817a)
1 parent 6046e06 commit 6876ad3

File tree

1 file changed

+2
-2
lines changed
  • packages/angular_devkit/build_angular/src/webpack/utils

1 file changed

+2
-2
lines changed
 

‎packages/angular_devkit/build_angular/src/webpack/utils/helpers.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ export function getOutputHashFormat(option: string, length = 20): HashFormat {
3232
none: { chunk: '', extract: '', file: '', script: '' },
3333
media: { chunk: '', extract: '', file: `.[hash:${length}]`, script: '' },
3434
bundles: {
35-
chunk: `.[chunkhash:${length}]`,
35+
chunk: `.[contenthash:${length}]`,
3636
extract: `.[contenthash:${length}]`,
3737
file: '',
3838
script: `.[hash:${length}]`,
3939
},
4040
all: {
41-
chunk: `.[chunkhash:${length}]`,
41+
chunk: `.[contenthash:${length}]`,
4242
extract: `.[contenthash:${length}]`,
4343
file: `.[hash:${length}]`,
4444
script: `.[hash:${length}]`,

0 commit comments

Comments
 (0)
Please sign in to comment.