diff --git a/src/AssetResolver.php b/src/AssetResolver.php index 4649f7e..f4a3eae 100644 --- a/src/AssetResolver.php +++ b/src/AssetResolver.php @@ -9,7 +9,7 @@ class AssetResolver { public function __invoke(string $fileRelativePath) { - if (str_starts_with($fileRelativePath, 'vendor/') && File::exists($absolutePath = public_path($fileRelativePath))) { + if (str_starts_with(trim($fileRelativePath, '/'), 'vendor/') && File::exists($absolutePath = public_path($fileRelativePath))) { return asset($fileRelativePath).'?digest='.(new FileDigest())($absolutePath); }