Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): correctly filter lazy global styl…
Browse files Browse the repository at this point in the history
…es in esbuild builder

Due to a typo in a conditional for the filtering of lazily defined global styles, global
styles were unintentionally always initial if no global scripts were present in the
application.
  • Loading branch information
clydin authored and angular-robot[bot] committed Apr 19, 2023
1 parent 1f34e44 commit 694b1ea
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ async function execute(
}

// Filter global stylesheet initial files. Currently all initial CSS files are from the global styles option.
if (options.globalScripts.length > 0) {
if (options.globalStyles.length > 0) {
bundlingResult.initialFiles = bundlingResult.initialFiles.filter(
({ file, name }) =>
!file.endsWith('.css') ||
Expand Down

0 comments on commit 694b1ea

Please sign in to comment.