Fix missing type="module" when js files are concatenated #2581

This commit is contained in:
Kijin Sung 2025-07-21 21:48:25 +09:00
parent a2281edc7a
commit f00d2800b5

View file

@ -624,7 +624,8 @@ class FrontEndFileHandler extends Handler
{
$url .= '?t=' . filemtime($file->fileFullPath);
}
$result[] = array('file' => $url);
$attrs = empty($file->jstype) ? '' : (' type="' . $file->jstype . '"');
$result[] = array('file' => $url, 'attrs' => $attrs);
}
else
{
@ -642,7 +643,7 @@ class FrontEndFileHandler extends Handler
Rhymix\Framework\Storage::write(\RX_BASEDIR . $concat_filename, $concat_content);
}
$concat_filename .= '?t=' . filemtime(\RX_BASEDIR . $concat_filename);
$result[] = array('file' => \RX_BASEURL . $concat_filename);
$result[] = array('file' => \RX_BASEURL . $concat_filename, 'attrs' => '');
}
}
}