From 67d60f2c0165a35ab21cec65c0783f7b3bbb867a Mon Sep 17 00:00:00 2001 From: Dmitrij Fedorenko Date: Fri, 5 Sep 2025 11:34:16 +0400 Subject: [PATCH 1/2] Bypass vite server watch config in dev --- .changeset/wet-walls-camp.md | 5 +++++ packages/react-router-dev/vite/plugin.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/wet-walls-camp.md diff --git a/.changeset/wet-walls-camp.md b/.changeset/wet-walls-camp.md new file mode 100644 index 0000000000..4d79eb8f82 --- /dev/null +++ b/.changeset/wet-walls-camp.md @@ -0,0 +1,5 @@ +--- +"@react-router/dev": patch +--- + +Copy `server.watch` config options from `vite.config.(ts|js)` file to child vite server in development mode. diff --git a/packages/react-router-dev/vite/plugin.ts b/packages/react-router-dev/vite/plugin.ts index 270ed24b30..a84ba6f30d 100644 --- a/packages/react-router-dev/vite/plugin.ts +++ b/packages/react-router-dev/vite/plugin.ts @@ -1518,7 +1518,7 @@ export const reactRouterVitePlugin: ReactRouterVitePlugin = () => { cacheDir: "node_modules/.vite-child-compiler", mode: viteConfig.mode, server: { - watch: viteConfig.command === "build" ? null : undefined, + watch: viteConfig.command === "build" ? null : viteConfig.server.watch, preTransformRequests: false, hmr: false, }, From 8404fa20127c78920dd8ae5b216da337ac124a30 Mon Sep 17 00:00:00 2001 From: Dmitrij Fedorenko Date: Fri, 5 Sep 2025 14:07:02 +0400 Subject: [PATCH 2/2] Add c0va23 to contributors.yml --- contributors.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/contributors.yml b/contributors.yml index 64f04cec93..4a184432f5 100644 --- a/contributors.yml +++ b/contributors.yml @@ -67,6 +67,7 @@ - brophdawg11 - btav - bvangraafeiland +- c0va23 - camthompson - CanRau - caprolactam