mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-13 00:14:02 +00:00
Merge pull request #2574 from mmustafasenoglu/fix/vite-hmr-docker-windows
fix: enable Chokidar polling for Vite HMR in Docker on Windows
This commit is contained in:
2 files changed
+7
No files matched your search
@@ -7,6 +7,7 @@ services:
|
||||
- VITE_API_HOST=http://localhost:7091
|
||||
- VITE_API_STREAMING=$VITE_API_STREAMING
|
||||
- VITE_EMBEDDINGS_NAME=$EMBEDDINGS_NAME
|
||||
- DOCKER=true
|
||||
ports:
|
||||
- "5173:5173"
|
||||
|
||||
|
||||
@@ -22,6 +22,12 @@ export default defineConfig(({ mode }) => {
|
||||
.map((h) => h.trim())
|
||||
.filter(Boolean)
|
||||
: [],
|
||||
// Use polling for file watching when running inside Docker.
|
||||
// Native fs events do not propagate from Windows hosts into Linux
|
||||
// containers, so Chokidar falls back to polling which works reliably.
|
||||
watch: env.DOCKER
|
||||
? { usePolling: true, interval: 300 }
|
||||
: undefined,
|
||||
},
|
||||
test: {
|
||||
environment: 'happy-dom',
|
||||
|
||||
Reference in new issue
Block a user