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

[11.x] Asset Prefetching #9838

Merged
merged 5 commits into from
Sep 5, 2024
Merged

[11.x] Asset Prefetching #9838

merged 5 commits into from
Sep 5, 2024

Conversation

timacdonald
Copy link
Member

@timacdonald timacdonald commented Aug 22, 2024

Documents the Vite::prefetch function.

Screenshot 2024-08-27 at 09 50 06 Screenshot 2024-08-27 at 09 52 38

@timacdonald timacdonald changed the title [11.x] Vite prefetch [11.x] Asset Prefetching (Vite) Aug 26, 2024
@timacdonald timacdonald changed the title [11.x] Asset Prefetching (Vite) [11.x] Asset Prefetching Aug 26, 2024
vite.md Outdated
<a name="asset-prefetching"></a>
## Asset Prefetching

When building a SPA using Vite's code splitting feature, required assets are fetched on each page navigation. This can lead to delayed UI rendering. If this is a problem for your front-end framework of choice, Laravel offers the ability to eagerly prefetch your application's JavaScript and CSS assets on initial page load.
Copy link
Contributor

Choose a reason for hiding this comment

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

When building a SPA => When building an SPA

Copy link
Member Author

@timacdonald timacdonald Sep 4, 2024

Choose a reason for hiding this comment

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

I treat "SPA" as an acronym rather than an initialism. Seems the docs has landed on the initialism so I'll update this. Thanks for the review!

Would prefer we used "S.P.A." to avoid the ambiguity, but that is not for this PR.

Fun poll on this topic: https://x.com/markdalgleish/status/1717709896962158636

@timacdonald timacdonald marked this pull request as ready for review September 4, 2024 00:47
@taylorotwell taylorotwell merged commit 06c3df0 into 11.x Sep 5, 2024
@taylorotwell taylorotwell deleted the prefetch branch September 5, 2024 21:04
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.

3 participants