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:
@@ -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',
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user