Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.x] Readd vite support #1421

Merged
merged 3 commits into from
Apr 22, 2024
Merged

Conversation

mmachatschek
Copy link
Contributor

@mmachatschek mmachatschek commented Apr 19, 2024

Fixes #1416

This readds the vite implementation to bundle the assets with a fix to support npm run dev mode on the side of consuming laravel apps.

Previously, the horizon page was broken because the Vite blade helper and the Vite Facade helper do not take into account that prebuilt assets by "third party" (in the sense of assets loaded by packages) packages should not be treated as uncompiled assets from the same laravel app.

The workaround here is suboptimal as I think the Vite blade helpers and the Vite Facade don't take into account that packages may also use these helper methods to render tags.

@taylorotwell
Copy link
Member

Hey @mmachatschek - can you explain what about this solution is "suboptimal"?

@mmachatschek
Copy link
Contributor Author

mmachatschek commented Apr 19, 2024

@taylorotwell suboptimal in the sense of having to pass in a non existent vite hotfile name in the view to work around the vite helper not being able to detect that the vendor/horizon assets were already published, as it's been pointed out here: #1416 (comment)

@taylorotwell taylorotwell merged commit 01fd607 into laravel:5.x Apr 22, 2024
12 checks passed
@mmachatschek mmachatschek deleted the readd_vite_support branch April 22, 2024 15:52
@jonathan-bird
Copy link

Please note that this caused an issue: #1439

Should at least use base_path or similar rather than a root dir slash in layout.blade.php to find your non existent file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Manifest.json cause 404 error if file in resources is missing
3 participants