From d1e5a52a2c036dabd29c4169aefbfd05a2da6cf4 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 81cd7e0bb3..0d77c37495 100644 --- a/packages/react-router-dev/vite/plugin.ts +++ b/packages/react-router-dev/vite/plugin.ts @@ -1519,7 +1519,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 6f08d2444e0bd84f785437bfb64fc2a9e05309e2 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 821d13e030..ea8a03a7a6 100644 --- a/contributors.yml +++ b/contributors.yml @@ -65,6 +65,7 @@ - brophdawg11 - btav - bvangraafeiland +- c0va23 - camthompson - CanRau - caprolactam