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.

(cherry picked from commit 694b1ea)
  • Loading branch information
clydin committed Apr 19, 2023
1 parent 9d74d72 commit dcf60d2
Showing 1 changed file with 1 addition and 1 deletion.
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 dcf60d2

Please sign in to comment.