Skip to content

Commit a4e865c

Browse files
committed
Make it possible to load theme/<themename>/dist
This fix a regression with the theming api following the change in webpack bundling introduced in 24 Signed-off-by: Carl Schwan <carl@carlschwan.eu>
1 parent fcc5f1e commit a4e865c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/private/Template/JSResourceLocator.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,14 @@ public function doFind($script) {
7171
} elseif ($this->appendIfExist($this->serverroot, $theme_dir.'apps/'.$script.'.js')
7272
|| $this->appendIfExist($this->serverroot, $theme_dir.$script.'.js')
7373
|| $this->appendIfExist($this->serverroot, $script.'.js')
74+
|| $this->appendIfExist($this->serverroot, "$theme_dir.'dist/$app-$scriptName.js")
7475
|| $this->appendIfExist($this->serverroot, "dist/$app-$scriptName.js")
7576
|| $this->appendIfExist($this->serverroot, 'apps/'.$script.'.js')
7677
|| $this->cacheAndAppendCombineJsonIfExist($this->serverroot, $script.'.json')
7778
|| $this->appendIfExist($this->serverroot, $theme_dir.'core/'.$script.'.js')
7879
|| $this->appendIfExist($this->serverroot, 'core/'.$script.'.js')
79-
|| (strpos($scriptName, '/') === -1 && $this->appendIfExist($this->serverroot, "dist/core-$scriptName.js"))
80+
|| (strpos($scriptName, '/') === -1 && ($this->appendIfExist($this->serverroot, $theme_dir . "dist/core-$scriptName.js")
81+
|| $this->appendIfExist($this->serverroot, "dist/core-$scriptName.js")))
8082
|| $this->cacheAndAppendCombineJsonIfExist($this->serverroot, 'core/'.$script.'.json')
8183
) {
8284
return;

0 commit comments

Comments
 (0)