From 139b788c9837d7313c96e62b8cada68082ea160a Mon Sep 17 00:00:00 2001 From: Tony Messias Date: Fri, 2 Feb 2024 19:50:09 -0300 Subject: [PATCH] Fix vendored files not adding digest --- src/AssetResolver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }