fix: drop react-swc plugin for esbuild JSX and add vite-bundle routes

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>
This commit is contained in:
thibaud-leclere
2026-03-28 13:51:54 +01:00
parent a6064c2bdb
commit 7abca03122
3 changed files with 48 additions and 3 deletions

View File

@@ -1,12 +1,15 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react-swc';
import symfonyPlugin from 'vite-plugin-symfony';
export default defineConfig({
plugins: [
react(),
symfonyPlugin(),
symfonyPlugin({
stimulus: true,
}),
],
esbuild: {
jsx: 'automatic',
},
build: {
rollupOptions: {
input: {
@@ -23,6 +26,7 @@ export default defineConfig({
hmr: {
host: 'localhost',
port: 5173,
protocol: 'ws',
},
},
});