From f00d2800b55f2814ce24f0759bc83f9fbe7e8322 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 21 Jul 2025 21:48:25 +0900 Subject: [PATCH] Fix missing type="module" when js files are concatenated #2581 --- classes/frontendfile/FrontEndFileHandler.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/classes/frontendfile/FrontEndFileHandler.class.php b/classes/frontendfile/FrontEndFileHandler.class.php index 034d190aa..bca493014 100644 --- a/classes/frontendfile/FrontEndFileHandler.class.php +++ b/classes/frontendfile/FrontEndFileHandler.class.php @@ -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' => ''); } } }