Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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