Skip to content

Commit

Permalink
Make it possible to load theme/<themename>/dist
Browse files Browse the repository at this point in the history
This fix a regression with the theming api following the change in
webpack bundling introduced in 24

Signed-off-by: Carl Schwan <[email protected]>
  • Loading branch information
CarlSchwan committed Aug 26, 2022
1 parent fcc5f1e commit a4e865c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/private/Template/JSResourceLocator.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,14 @@ public function doFind($script) {
} 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, $theme_dir . "dist/core-$scriptName.js")
|| $this->appendIfExist($this->serverroot, "dist/core-$scriptName.js")))
|| $this->cacheAndAppendCombineJsonIfExist($this->serverroot, 'core/'.$script.'.json')
) {
return;
Expand Down

0 comments on commit a4e865c

Please sign in to comment.