Closed
Description
Laravel Version
12.15.X
PHP Version
8.4
Database Driver & Version
Sqlite
Description
In my Larave 10.4.1 application using Vite for asset bundling, I'm getting the following browser warning in the console when i use aggresive
prefetching:
The resource https:/<...>/app-l0sNRNKZ.js was preloaded using link preload but not used within a few seconds from the window's load event.
Please make sure it has an appropriate `as` value and it is preloaded intentionally.
This happens even though the app.js file is included with the `@vite('resources/js/app.js')` directive in my Blade layout, and the generated preload link uses `rel="modulepreload"`.
It appears that the asset is preloaded correctly, but the browser considers it unused shortly after load, possibly due to how Vite or Laravel delays its usage via dynamic import or defer.
Steps To Reproduce
Any laravel project