Skip to content

Commit dcf60d2

Browse files
committed
fix(@angular-devkit/build-angular): correctly filter lazy global styles 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)
1 parent 9d74d72 commit dcf60d2

File tree

1 file changed

+1
-1
lines changed
  • packages/angular_devkit/build_angular/src/builders/browser-esbuild

1 file changed

+1
-1
lines changed

packages/angular_devkit/build_angular/src/builders/browser-esbuild/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ async function execute(
166166
}
167167

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

0 commit comments

Comments
 (0)