Skip to content

Commit 0286529

Browse files
jkremsclydin
authored andcommittedDec 20, 2024
fix(@angular-devkit/build-angular): preserve css type for jasmine.css
We should only force the type for files that we know are JavaScript. Otherwise we risk breaking the magic type detection done by Karma. The previous code broke for `jasmine.css`. Fixes #29190 (cherry picked from commit 916979c)
1 parent d17124f commit 0286529

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎packages/angular_devkit/build_angular/src/builders/karma/application_builder.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ class AngularPolyfillsPlugin {
156156
// page load. `type` won't affect them.
157157
continue;
158158
}
159-
if ('js' === (f.type ?? 'js')) {
159+
if (f.pattern.endsWith('.js') && 'js' === (f.type ?? 'js')) {
160160
f.type = 'module';
161161
}
162162
}

0 commit comments

Comments
 (0)