From f42a3ba286ff7065ac6322a39fa2e5fed8962036 Mon Sep 17 00:00:00 2001 From: thibaud-leclere Date: Sun, 29 Mar 2026 23:14:16 +0200 Subject: [PATCH] fix: manually register Stimulus controllers in bootstrap.js Auto-discovery may not work reliably with vite-plugin-symfony. Explicit registration ensures dropdown, notifications, and import-modal controllers are loaded. Co-Authored-By: Claude Opus 4.6 --- assets/bootstrap.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/assets/bootstrap.js b/assets/bootstrap.js index 5c41e5e..c8354e5 100644 --- a/assets/bootstrap.js +++ b/assets/bootstrap.js @@ -1,6 +1,12 @@ import { startStimulusApp } from 'vite-plugin-symfony/stimulus/helpers'; +import DropdownController from './controllers/dropdown_controller.js'; +import NotificationsController from './controllers/notifications_controller.js'; +import ImportModalController from './controllers/import_modal_controller.js'; const app = startStimulusApp(); +app.register('dropdown', DropdownController); +app.register('notifications', NotificationsController); +app.register('import-modal', ImportModalController); // Register React components for {{ react_component() }} Twig function. // We register them manually because @symfony/ux-react's registerReactControllerComponents