diff --git a/src/Helper/ViteHelper.php b/src/Helper/ViteHelper.php index 5955154..69322a1 100644 --- a/src/Helper/ViteHelper.php +++ b/src/Helper/ViteHelper.php @@ -7,6 +7,7 @@ use SilverStripe\ORM\FieldType\DBField; use SilverStripe\View\TemplateGlobalProvider; use SilverStripe\View\ViewableData; +use SilverStripe\Control\Director; class ViteHelper extends ViewableData implements TemplateGlobalProvider { @@ -85,7 +86,7 @@ public static function Vite($path, int $getCSSFile = null): string } else { $path = $outputUrl . $manifest[$path]['file']; } - return Convert::raw2att("/{$path}"); + return Convert::raw2att(Director::absoluteURL($path)); } }