Skip to content

Commit 84f3977

Browse files
alan-agius4filipesilva
authored andcommitted
fix(@angular-devkit/build-angular): only remove nomodule and defer attributes empty values
Closes #20207
1 parent 240727a commit 84f3977

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/angular_devkit/build_angular/src/utils/index-file/inline-critical-css.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export class InlineCriticalCssProcessor {
6363
// Clean up value from value less attributes.
6464
// This is caused because parse5 always requires attributes to have a string value.
6565
// nomodule="" defer="" -> nomodule defer.
66-
content: content.replace(/(\s[a-z]+)=""/g, '$1'),
66+
content: content.replace(/(\s(?:defer|nomodule))=""/g, '$1'),
6767
errors: critters.errors,
6868
warnings: critters.warnings,
6969
};

0 commit comments

Comments
 (0)