From 10a263a7af99fbdafea799ae6d41d893ad888fb6 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Thu, 3 Jun 2021 15:19:28 -0400 Subject: [PATCH] fix(@angular-devkit/build-angular): ensure all Webpack Stats assets are present on rebuilds Webpack will only provide emitted assets in the returned Stats each rebuild unless the `cachedAssets` option is enabled. This is currently needed for the bundle budget calculations. Fixes #21038 (cherry picked from commit 11a414e4689fc33270ee0a99667c9019616a7edb) --- .../angular_devkit/build_angular/src/webpack/configs/stats.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/angular_devkit/build_angular/src/webpack/configs/stats.ts b/packages/angular_devkit/build_angular/src/webpack/configs/stats.ts index a031a906d9b1..204b0caaab4a 100644 --- a/packages/angular_devkit/build_angular/src/webpack/configs/stats.ts +++ b/packages/angular_devkit/build_angular/src/webpack/configs/stats.ts @@ -18,6 +18,7 @@ const webpackOutputOptions = { warnings: true, errors: true, assets: true, // required by custom stat output + cachedAssets: true, // required for bundle size calculators // Needed for markAsyncChunksNonInitial. ids: true,