Symfony UX doesn't officially support defining Live Components in reusable bundles (see #3064). However, if you add the following config for your live component, it works inside a bundle:
// config/services.php
return static function (ContainerConfigurator $container) {
// ...
$services->set(ProductSearch::class)
// ...
->tag('twig.component', [
'live' => true,
'route' => 'ux_live_component',
'url_reference_type' => true,
])
->tag('controller.service_arguments');
};
We don't want to promote this because it's a hack that could break at any moment because of Symfony UX changes. But, hopefully there's a way to make this work officially in some way to allow Live Components be distributable more easily in Symfony bundles.
Thanks!
Symfony UX doesn't officially support defining Live Components in reusable bundles (see #3064). However, if you add the following config for your live component, it works inside a bundle:
We don't want to promote this because it's a hack that could break at any moment because of Symfony UX changes. But, hopefully there's a way to make this work officially in some way to allow Live Components be distributable more easily in Symfony bundles.
Thanks!