mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-12-25 14:10:28 +01:00
Bugfix: make vite dist path relative
This commit is contained in:
parent
d39af1c26f
commit
761b316bdc
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user