Skip to content

Commit

Permalink
Add asset versioning for default build location using vite (#399)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
WouterSioen authored Jun 27, 2022
1 parent 917bec9 commit 540b953
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Middleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ public function version(Request $request)
return md5_file($manifest);
}

if (file_exists($manifest = public_path('build/manifest.json'))) {
return md5_file($manifest);
}

return null;
}

Expand Down

1 comment on commit 540b953

@ranjeetb2
Copy link

@ranjeetb2 ranjeetb2 commented on 540b953 Jul 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but documentation is not updated, installation is not working with laravel

Please sign in to comment.