fix: use import.meta.glob instead of require.context for Vite compatibility
require.context is Webpack-only. Vite uses import.meta.glob. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2
assets/bootstrap.js
vendored
2
assets/bootstrap.js
vendored
@@ -3,4 +3,4 @@ import { registerReactControllerComponents } from '@symfony/ux-react';
|
||||
|
||||
const app = startStimulusApp();
|
||||
|
||||
registerReactControllerComponents(require.context('./react/controllers', true, /\.(j|t)sx?$/));
|
||||
registerReactControllerComponents(import.meta.glob('./react/controllers/**/*.jsx', { eager: true }));
|
||||
|
||||
Reference in New Issue
Block a user