mirror of
https://github.com/Froxlor/Froxlor.git
synced 2024-09-21 10:27:29 +00:00
include custom.css from config.json if preset correctly
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
parent
e7810e2066
commit
150858485d
@ -112,9 +112,14 @@ function vite($basehref, array $filenames): string
|
||||
$assetDirectory = '/templates/' . $matches[1] . '/build/';
|
||||
$viteManifest = dirname(__DIR__) . $assetDirectory . '/manifest.json';
|
||||
$manifest = json_decode(file_get_contents($viteManifest), true);
|
||||
$links[] = $basehref . ltrim($assetDirectory, '/') . $manifest[$filename]['file'];
|
||||
if (!empty($manifest[$filename]['file'])) {
|
||||
$links[] = $basehref . ltrim($assetDirectory, '/') . $manifest[$filename]['file'];
|
||||
} else {
|
||||
// additional asset from config.json that was not prebuilt on release (e.g. custom.css)
|
||||
$links[] = $filename;
|
||||
}
|
||||
} else {
|
||||
$links = $filenames;
|
||||
$links[] = $filename;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user