Skip to content

Commit

Permalink
Fix: JavaScript asset Content-Type
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenberttpingol committed Oct 15, 2024
1 parent ba4c87f commit 0e50bf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/xmds.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
if ($file->type === 'L') {
// Layouts are always XML
header('Content-Type: text/xml');
} else if ($file->fileType === 'bundle') {
} else if ($file->fileType === 'bundle' || \Illuminate\Support\Str::endsWith($file->path, '.js')) {
header('Content-Type: application/javascript');
} else if ($file->fileType === 'fontCss' || \Illuminate\Support\Str::endsWith($file->path, '.css')) {
$isCss = true;
Expand Down

0 comments on commit 0e50bf3

Please sign in to comment.