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>
33 lines
649 B
JavaScript
33 lines
649 B
JavaScript
import { defineConfig } from 'vite';
|
|
import symfonyPlugin from 'vite-plugin-symfony';
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
symfonyPlugin({
|
|
stimulus: true,
|
|
}),
|
|
],
|
|
esbuild: {
|
|
jsx: 'automatic',
|
|
},
|
|
build: {
|
|
rollupOptions: {
|
|
input: {
|
|
app: './assets/app.js',
|
|
},
|
|
},
|
|
},
|
|
server: {
|
|
host: '0.0.0.0',
|
|
port: 5173,
|
|
strictPort: true,
|
|
origin: 'http://localhost:5173',
|
|
cors: true,
|
|
hmr: {
|
|
host: 'localhost',
|
|
port: 5173,
|
|
protocol: 'ws',
|
|
},
|
|
},
|
|
});
|