Skip to content

Commit 540b953

Browse files
authored
Add asset versioning for default build location using vite (#399)
When mix is not used for asset compilation, chances are high that vite is used instead. That's why I think it makes sense to add the default location that vite builds to as a fallback for when now mix-manifest is available
1 parent 917bec9 commit 540b953

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Middleware.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ public function version(Request $request)
3636
return md5_file($manifest);
3737
}
3838

39+
if (file_exists($manifest = public_path('build/manifest.json'))) {
40+
return md5_file($manifest);
41+
}
42+
3943
return null;
4044
}
4145

0 commit comments

Comments
 (0)