Skip to content

Commit c14e9e3

Browse files
committed
fix: Hide TanStack devtools in production
1 parent 6d920c2 commit c14e9e3

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

src/routes/__root.tsx

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,20 @@ function RootDocument({ children }: { children: React.ReactNode }) {
5656
</head>
5757
<body className="dark">
5858
{children}
59-
<TanStackDevtools
60-
config={{
61-
position: "bottom-right",
62-
}}
63-
plugins={[
64-
{
65-
name: "Tanstack Router",
66-
render: <TanStackRouterDevtoolsPanel />,
67-
},
68-
TanStackQueryDevtools,
69-
]}
70-
/>
59+
{process.env.NODE_ENV !== "production" && (
60+
<TanStackDevtools
61+
config={{
62+
position: "bottom-right",
63+
}}
64+
plugins={[
65+
{
66+
name: "Tanstack Router",
67+
render: <TanStackRouterDevtoolsPanel />,
68+
},
69+
TanStackQueryDevtools,
70+
]}
71+
/>
72+
)}
7173
<Scripts />
7274
</body>
7375
</html>

0 commit comments

Comments
 (0)