Skip to content

Commit d33fadc

Browse files
committed
chore(Template): allow styles from dist folder
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent 2139a08 commit d33fadc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/private/Template/CSSResourceLocator.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,15 @@ public function __construct(
2525
}
2626

2727
public function doFind(string $resource): void {
28-
$parts = explode('/', $resource, 2);
28+
$parts = explode('/', $resource);
2929
if (count($parts) < 2) {
3030
return;
3131
}
32-
[$app,$subpath] = $parts;
32+
$app = $parts[0];
33+
$filename = $parts[array_key_last($parts)];
3334
if ($this->appendIfExist($this->serverroot, $resource . '.css')
3435
|| $this->appendIfExist($this->serverroot, 'core/' . $resource . '.css')
36+
|| $this->appendIfExist($this->serverroot, 'dist/' . $app . '-' . $filename . '.css')
3537
) {
3638
return;
3739
}

0 commit comments

Comments
 (0)