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 <noreply@anthropic.com>
This commit is contained in:
parent
783a8492e9
commit
04301642bc
1 changed files with 5 additions and 0 deletions
|
|
@ -19,5 +19,10 @@ export default defineConfig({
|
||||||
port: 5173,
|
port: 5173,
|
||||||
strictPort: true,
|
strictPort: true,
|
||||||
origin: 'http://localhost:5173',
|
origin: 'http://localhost:5173',
|
||||||
|
cors: true,
|
||||||
|
hmr: {
|
||||||
|
host: 'localhost',
|
||||||
|
port: 5173,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue