File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
packages/react-router-dev/vite Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -747,10 +747,12 @@ export const reactRouterVitePlugin: ReactRouterVitePlugin = () => {
747747 rootDirectory =
748748 viteUserConfig . root ?? process . env . REACT_ROUTER_ROOT ?? process . cwd ( ) ;
749749
750- Typegen . watch ( rootDirectory , {
751- // ignore `info` logs from typegen since they are redundant when Vite plugin logs are active
752- logger : vite . createLogger ( "warn" , { prefix : "[react-router]" } ) ,
753- } ) ;
750+ if ( viteCommand === "serve" ) {
751+ Typegen . watch ( rootDirectory , {
752+ // ignore `info` logs from typegen since they are redundant when Vite plugin logs are active
753+ logger : vite . createLogger ( "warn" , { prefix : "[react-router]" } ) ,
754+ } ) ;
755+ }
754756
755757 reactRouterConfigLoader = await createConfigLoader ( {
756758 rootDirectory,
You can’t perform that action at this time.
0 commit comments