Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): skip downlevel processing of ass…
Browse files Browse the repository at this point in the history
…ets (#15433)

* fix(@angular-devkit/build-angular): identify asset emitted files

* fix(@angular-devkit/build-angular): skip downlevel processing of assets

Fixes #15423
  • Loading branch information
clydin authored and mgechev committed Aug 26, 2019
1 parent 860d592 commit 4986577
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions packages/angular_devkit/build_angular/src/browser/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,11 @@ export function buildWebpackBrowser(
const actions: ProcessBundleOptions[] = [];
const seen = new Set<string>();
for (const file of emittedFiles) {
// Assets are not processed nor injected into the index
if (file.asset) {
continue;
}

// Scripts and non-javascript files are not processed
if (
file.extension !== '.js' ||
Expand Down
3 changes: 2 additions & 1 deletion packages/angular_devkit/build_webpack/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export interface EmittedFiles {
name?: string;
file: string;
initial: boolean;
asset?: boolean;
extension: string;
}

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

// other all files
for (const file of Object.keys(compilation.assets)) {
files.push({ file, extension: path.extname(file), initial: false });
files.push({ file, extension: path.extname(file), initial: false, asset: true });
}

// dedupe
Expand Down

0 comments on commit 4986577

Please sign in to comment.