From 84f39778cc37c997d0b2b5295f766e08d4c94c78 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Mon, 8 Mar 2021 12:48:26 +0100 Subject: [PATCH] fix(@angular-devkit/build-angular): only remove nomodule and defer attributes empty values Closes #20207 --- .../build_angular/src/utils/index-file/inline-critical-css.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/src/utils/index-file/inline-critical-css.ts b/packages/angular_devkit/build_angular/src/utils/index-file/inline-critical-css.ts index a666f7e12c05..52a2867945d7 100644 --- a/packages/angular_devkit/build_angular/src/utils/index-file/inline-critical-css.ts +++ b/packages/angular_devkit/build_angular/src/utils/index-file/inline-critical-css.ts @@ -63,7 +63,7 @@ export class InlineCriticalCssProcessor { // Clean up value from value less attributes. // This is caused because parse5 always requires attributes to have a string value. // nomodule="" defer="" -> nomodule defer. - content: content.replace(/(\s[a-z]+)=""/g, '$1'), + content: content.replace(/(\s(?:defer|nomodule))=""/g, '$1'), errors: critters.errors, warnings: critters.warnings, };