diff --git a/contributors.yml b/contributors.yml index 8de7f34850..0a7e13fb83 100644 --- a/contributors.yml +++ b/contributors.yml @@ -74,6 +74,7 @@ - brophdawg11 - btav - bvangraafeiland +- c0va23 - camthompson - CanRau - caprolactam diff --git a/packages/react-router-dev/.changes/patch.copy-server-watch-config.md b/packages/react-router-dev/.changes/patch.copy-server-watch-config.md new file mode 100644 index 0000000000..e90657d8cd --- /dev/null +++ b/packages/react-router-dev/.changes/patch.copy-server-watch-config.md @@ -0,0 +1 @@ +Pass Vite `server.watch` config to child compiler in development mode. diff --git a/packages/react-router-dev/vite/plugin.ts b/packages/react-router-dev/vite/plugin.ts index 7710912526..06a4462991 100644 --- a/packages/react-router-dev/vite/plugin.ts +++ b/packages/react-router-dev/vite/plugin.ts @@ -1551,7 +1551,8 @@ 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, },