From 270188b5b01c55c30b481eeb565ff5be05143572 Mon Sep 17 00:00:00 2001 From: Sami Mazouz Date: Fri, 26 Apr 2024 14:25:13 +0100 Subject: [PATCH] fix: compiling split chunks in production --- .../core/src/Frontend/Compiler/JsDirectoryCompiler.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/framework/core/src/Frontend/Compiler/JsDirectoryCompiler.php b/framework/core/src/Frontend/Compiler/JsDirectoryCompiler.php index bc5406e5bf..d69be61dcd 100644 --- a/framework/core/src/Frontend/Compiler/JsDirectoryCompiler.php +++ b/framework/core/src/Frontend/Compiler/JsDirectoryCompiler.php @@ -18,8 +18,6 @@ /** * Used to copy JS files from a package directory to the assets' directory. * Without concatenating them. Primarily used for lazy loading JS modules. - * - * @method DirectorySource[] getSources() */ class JsDirectoryCompiler implements CompilerInterface { @@ -53,6 +51,10 @@ public function commit(bool $force = false): void public function getUrl(): ?string { + foreach ($this->getSources() as $source) { + $this->eachFile($source, fn (JsCompiler $compiler) => $compiler->getUrl()); + } + return null; }