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

ofrommel's avatar

Inertia in Laravel Package

Hi, I am looking for best practices of using Inertia in Laravel packages. The objective is to create Laravel packages with Inertia/Vue templates that can be maintained out of the main application. While there are mechanisms to achieve this goal on the PHP level such as ServiceProviders that provides views and routes there's no such way for the inclusion of Javascript assets to be compiled by Vite as far as I know. Consequently when I put Vue templates in a package and recompile the assets with "vite build" the assets in the package won't get compiled. Trying to put the Vue SFCs inside createInertiaApp/resolve produces a "vite manifest not found error". Thanks for any hints.

0 likes
0 replies

Please or to participate in this conversation.