Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

libertie's avatar

Inertia Module Preloads

I'm looking at a fresh install of Laravel Jetstream with Inertia and trying to understand how pages are loaded. The inspector shows three references to the Welcome page module:

<link rel="modulepreload" href="http://testing.localhost/build/assets/Welcome-f0af674f.js">
...
<script type="module" src="http://testing.localhost/build/assets/Welcome-f0af674f.js"></script>
...
<link rel="modulepreload" as="script" crossorigin="" href="/build/assets/Welcome-f0af674f.js">

The first line preloads the script and the second loads and runs it. Both lines are generated by @vite(['resources/js/app.js', "resources/js/Pages/{$page['component']}.vue"]).

What does the third line, generated by @inertiaHead, do that isn't already being accomplished?

0 likes
1 reply

Please or to participate in this conversation.