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>
This commit is contained in:
Carl Schwan 2022-08-25 13:18:55 +02:00 committed by John Molakvoæ
parent fa466a093c
commit 329687ecff
No known key found for this signature in database
GPG key ID: 60C25B8C072916CF

View file

@ -71,12 +71,14 @@ class JSResourceLocator extends ResourceLocator {
} elseif ($this->appendIfExist($this->serverroot, $theme_dir.'apps/'.$script.'.js')
|| $this->appendIfExist($this->serverroot, $theme_dir.$script.'.js')
|| $this->appendIfExist($this->serverroot, $script.'.js')
|| $this->appendIfExist($this->serverroot, "$theme_dir.'dist/$app-$scriptName.js")
|| $this->appendIfExist($this->serverroot, "dist/$app-$scriptName.js")
|| $this->appendIfExist($this->serverroot, 'apps/'.$script.'.js')
|| $this->cacheAndAppendCombineJsonIfExist($this->serverroot, $script.'.json')
|| $this->appendIfExist($this->serverroot, $theme_dir.'core/'.$script.'.js')
|| $this->appendIfExist($this->serverroot, 'core/'.$script.'.js')
|| (strpos($scriptName, '/') === -1 && $this->appendIfExist($this->serverroot, "dist/core-$scriptName.js"))
|| (strpos($scriptName, '/') === -1 && ($this->appendIfExist($this->serverroot, "dist/core-$scriptName.js")
|| $this->appendIfExist($this->serverroot, $theme_dir . "dist/core-$scriptName.js")))
|| $this->cacheAndAppendCombineJsonIfExist($this->serverroot, 'core/'.$script.'.json')
) {
return;