diff --git a/client/src/index.jsx b/client/src/index.jsx index e19836f19..6a87f770e 100644 --- a/client/src/index.jsx +++ b/client/src/index.jsx @@ -16,6 +16,7 @@ import "./utils/CleanAxios"; // import * as amplitude from "@amplitude/analytics-browser"; import { PostHogProvider } from "posthog-js/react"; import posthog from "posthog-js"; +import { StrictMode } from "react"; window.global ||= window; @@ -77,6 +78,18 @@ function App() { ); } -ReactDOM.createRoot(document.getElementById("root")).render(); +const rootEl = document.getElementById("root"); + +if (!rootEl) throw new Error('Missing root element:
'); + +const appTree = import.meta.env.DEV ? ( + + + +) : ( + +); + +ReactDOM.createRoot(rootEl).render(appTree); reportWebVitals();