Use vite to detech production mode

This commit is contained in:
Arnaud 2024-08-30 18:10:18 +02:00
parent a9ec0c5156
commit cf3adb634a
No known key found for this signature in database
GPG Key ID: 69D6CE281FCAE663

View File

@ -1,8 +1,7 @@
import { createRootRoute, Outlet } from "@tanstack/react-router";
import React from "react";
const TanStackRouterDevtools =
process.env.NODE_ENV === "production"
const TanStackRouterDevtools = import.meta.env.PROD
? () => null // Render nothing in production
: React.lazy(() =>
// Lazy load in development