Skip to content

Commit 942da4d

Browse files
clydinmgechev
authored andcommitted
fix(@angular-devkit/build-angular): skip downlevel processing of assets (#15433)
* fix(@angular-devkit/build-angular): identify asset emitted files * fix(@angular-devkit/build-angular): skip downlevel processing of assets Fixes #15423
1 parent 0677d30 commit 942da4d

File tree

2 files changed

+7
-1
lines changed
  • packages/angular_devkit

2 files changed

+7
-1
lines changed

packages/angular_devkit/build_angular/src/browser/index.ts

+5
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,11 @@ export function buildWebpackBrowser(
289289
const actions: ProcessBundleOptions[] = [];
290290
const seen = new Set<string>();
291291
for (const file of emittedFiles) {
292+
// Assets are not processed nor injected into the index
293+
if (file.asset) {
294+
continue;
295+
}
296+
292297
// Scripts and non-javascript files are not processed
293298
if (
294299
file.extension !== '.js' ||

packages/angular_devkit/build_webpack/src/utils.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export interface EmittedFiles {
1313
name?: string;
1414
file: string;
1515
initial: boolean;
16+
asset?: boolean;
1617
extension: string;
1718
}
1819

@@ -42,7 +43,7 @@ export function getEmittedFiles(compilation: webpack.compilation.Compilation): E
4243

4344
// other all files
4445
for (const file of Object.keys(compilation.assets)) {
45-
files.push({ file, extension: path.extname(file), initial: false });
46+
files.push({ file, extension: path.extname(file), initial: false, asset: true });
4647
}
4748

4849
// dedupe

0 commit comments

Comments
 (0)