diff --git a/frontend/src/routes/__root.tsx b/frontend/src/routes/__root.tsx index 9aff46f385..a9c87d39de 100644 --- a/frontend/src/routes/__root.tsx +++ b/frontend/src/routes/__root.tsx @@ -1,13 +1,24 @@ +import React, { Suspense } from 'react' import { createRootRoute, Outlet } from '@tanstack/react-router' -import { TanStackRouterDevtools } from '@tanstack/router-devtools' import NotFound from '../components/Common/NotFound' +const TanStackRouterDevtools = + process.env.NODE_ENV === 'production' + ? () => null + : React.lazy(() => + import('@tanstack/router-devtools').then((res) => ({ + default: res.TanStackRouterDevtools, + })), + ) + export const Route = createRootRoute({ component: () => ( <> - + + + ), notFoundComponent: () => ,