From 04301642bc6ffee7518f83880b3e34d75ec494c0 Mon Sep 17 00:00:00 2001 From: thibaud-leclere Date: Sat, 28 Mar 2026 13:36:57 +0100 Subject: [PATCH] fix: add CORS and HMR config to vite for cross-origin Docker setup 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 --- vite.config.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vite.config.js b/vite.config.js index e056bb2..c255f9d 100644 --- a/vite.config.js +++ b/vite.config.js @@ -19,5 +19,10 @@ export default defineConfig({ port: 5173, strictPort: true, origin: 'http://localhost:5173', + cors: true, + hmr: { + host: 'localhost', + port: 5173, + }, }, });