Volt components inside packages not recognized or compiled despite Volt::mount() setup
Volt Version
1.7.1
Laravel Version
12.21
PHP Version
8.4.10
Database Driver & Version
No response
Description
Volt components placed inside a Laravel package are not recognized or compiled, even when mounted using Volt::mount() from the main application.
Despite the following being correctly configured:
- The
.blade.phpcomponent exists in the expected path inside the package - The namespace is properly registered via
Volt::mount() - The route is defined with the correct namespace and path
- All caches are cleared (
view:clear,optimize:clear,composer dump-autoload, etc.)
Volt throws:
Livewire\Exceptions\ComponentNotFoundException
Unable to find component: [vendor-package::section.example-component]
These same components work fine when placed inside the main application’s resources/views/livewire folder, which confirms that Volt is not compiling or registering them from mounted package paths.
Steps To Reproduce
-
Create a Laravel package (e.g.
vendor/package-name) -
Inside the package, add a Volt component file at:
resources/views/livewire/section/example-component.blade.php -
In your package’s
ServiceProvider, mount the Volt views using:use Livewire\Volt\Volt; public function boot(): void { Volt::mount( __DIR__ . '/../resources/views/livewire', 'vendor-package' ); } -
In the main Laravel application, define a Volt route in
routes/web.php:use Livewire\Volt\Volt; Volt::route('settings/example', 'vendor-package::section.example-component') ->name('settings.example'); -
Run:
php artisan optimize:clear composer dump-autoload -
Visit
/settings/examplein the browser
✅ Expected: The Volt component renders normally
❌ Actual: Livewire throws a ComponentNotFoundException
Hey everyone,
Laravel 12 and Livewire 3.6 are out, but this package doesn’t officially support them yet. If you’re using Volt and planning to upgrade (or already have), it’d help to raise visibility by commenting or reacting when someone opens an issue about compatibility.
Let’s make sure Volt stays up-to-date with the ecosystem.