mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-11-15 04:27:14 +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')) {
|
if (defined('VITE_DEV_SERVER')) {
|
||||||
$url = 'http://' . VITE_DEV_SERVER . '/' . $module->src;
|
$url = 'http://' . VITE_DEV_SERVER . '/' . $module->src;
|
||||||
} else {
|
} else {
|
||||||
$url = $this->assetDir . '/' . $module->file;
|
$url = '.'.$this->assetDir . '/' . $module->file;
|
||||||
if (isset($module->css)) {
|
if (isset($module->css)) {
|
||||||
foreach ($module->css as $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";
|
$html .= "\r\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif (str_starts_with($module,$this->baseDir.'/www')) {
|
} 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)) {
|
if (isset($url)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user