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>
29 lines
593 B
JavaScript
29 lines
593 B
JavaScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import symfonyPlugin from 'vite-plugin-symfony';
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
react(),
|
|
symfonyPlugin(),
|
|
],
|
|
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,
|
|
},
|
|
},
|
|
});
|