Skip to content

Commit 4ce12f1

Browse files
committed
perf: Prepend the app as a whole
Signed-off-by: Joas Schilling <[email protected]>
1 parent 6f0537b commit 4ce12f1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/public/Util.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,11 @@ public static function addScript(string $application, ?string $file = null, stri
168168
}
169169

170170
if ($prepend) {
171+
// Make sure the scripts of prepended applications are prepended within the apps as well
172+
$appDeps = self::$scriptDeps[$application] ?? [];
173+
unset(self::$scriptDeps[$application]);
174+
self::$scriptDeps = [$application => $appDeps] + self::$scriptDeps;
175+
171176
array_unshift(self::$scripts[$application], $path);
172177
} else {
173178
self::$scripts[$application][] = $path;

0 commit comments

Comments
 (0)