Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): preserve css type for jasmine.css
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jkrems authored and clydin committed Dec 20, 2024
1 parent d581c54 commit 916979c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class AngularPolyfillsPlugin {
// page load. `type` won't affect them.
continue;
}
if ('js' === (f.type ?? 'js')) {
if (f.pattern.endsWith('.js') && 'js' === (f.type ?? 'js')) {
f.type = 'module';
}
}
Expand Down

0 comments on commit 916979c

Please sign in to comment.