The @symfony/stimulus-bundle loader generates an empty controllers.js,
so Stimulus controllers from controllers.json (including ux-react) were
never registered. Switching to vite-plugin-symfony/stimulus/helpers
uses the virtual:symfony/controllers module that properly reads
controllers.json. Also wrap react_component() output in a <div> since
it only renders data-attributes, not a full HTML element.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use esbuild's built-in JSX transform instead of @vitejs/plugin-react-swc
to fix the React Fast Refresh preamble error caused by eager glob imports.
Add missing pentatrion_vite routes to fix web debug toolbar 500 errors.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace @vitejs/plugin-react with @vitejs/plugin-react-swc to fix
React Refresh preamble detection error in cross-origin Docker setup
- Register React components manually via window.resolveReactComponent
since ux-react's registerReactControllerComponents uses Webpack's
require.context API which is incompatible with Vite
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The app is served on port 80 while Vite runs on 5173. The React
plugin needs proper CORS and HMR host config to inject its preamble.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>