Merge pull request #138 from exciler/matrixartikel

Bugfix: make vite dist path relative
This commit is contained in:
OpenXE-ERP 2024-04-08 12:34:05 +02:00 committed by GitHub
commit 1a9f1e8167
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -305,15 +305,15 @@ class ModuleScriptCache
if (defined('VITE_DEV_SERVER')) {
$url = 'http://' . VITE_DEV_SERVER . '/' . $module->src;
} else {
$url = $this->assetDir . '/' . $module->file;
$url = '.'.$this->assetDir . '/' . $module->file;
if (isset($module->css)) {
foreach ($module->css as $css)
$html .= sprintf('<link rel="stylesheet" type="text/css" href="%s" />', $this->assetDir.'/'.$css);
$html .= sprintf('<link rel="stylesheet" type="text/css" href="%s" />', '.'.$this->assetDir.'/'.$css);
$html .= "\r\n";
}
}
} elseif (str_starts_with($module,$this->baseDir.'/www')) {
$url = substr($module, strlen($this->baseDir)+4);
$url = '.'.substr($module, strlen($this->baseDir)+4);
}
if (isset($url)) {