Skip to content

Commit 65a44ab

Browse files
c0va23Dmitrii Fedorenko
authored andcommitted
Bypass vite server watch config in dev
1 parent 63cd65a commit 65a44ab

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/wet-walls-camp.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@react-router/dev": patch
3+
---
4+
5+
Copy `server.watch` config options from `vite.config.(ts|js)` file to child vite server in development mode.

packages/react-router-dev/vite/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1519,7 +1519,7 @@ export const reactRouterVitePlugin: ReactRouterVitePlugin = () => {
15191519
cacheDir: "node_modules/.vite-child-compiler",
15201520
mode: viteConfig.mode,
15211521
server: {
1522-
watch: viteConfig.command === "build" ? null : undefined,
1522+
watch: viteConfig.command === "build" ? null : viteConfig.server.watch,
15231523
preTransformRequests: false,
15241524
hmr: false,
15251525
},

0 commit comments

Comments
 (0)