From beca50c46bcabb2bb28c1b24a680113cb0e9eefb Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Mon, 10 Jan 2022 12:51:21 +0100 Subject: [PATCH] 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 https://github.com/waysact/webpack-subresource-integrity/issues/162 for more information about this. Closes #22439 --- .../angular_devkit/build_angular/src/webpack/utils/helpers.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/webpack/utils/helpers.ts b/packages/angular_devkit/build_angular/src/webpack/utils/helpers.ts index 4944cb0d0c4d..ab0f78250a5d 100644 --- a/packages/angular_devkit/build_angular/src/webpack/utils/helpers.ts +++ b/packages/angular_devkit/build_angular/src/webpack/utils/helpers.ts @@ -32,13 +32,13 @@ export function getOutputHashFormat(option: string, length = 20): HashFormat { none: { chunk: '', extract: '', file: '', script: '' }, media: { chunk: '', extract: '', file: `.[hash:${length}]`, script: '' }, bundles: { - chunk: `.[chunkhash:${length}]`, + chunk: `.[contenthash:${length}]`, extract: `.[contenthash:${length}]`, file: '', script: `.[hash:${length}]`, }, all: { - chunk: `.[chunkhash:${length}]`, + chunk: `.[contenthash:${length}]`, extract: `.[contenthash:${length}]`, file: `.[hash:${length}]`, script: `.[hash:${length}]`,