mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-03-21 18:04:39 -05:00
11 lines
435 B
TypeScript
11 lines
435 B
TypeScript
import { RemixBrowser } from "@remix-run/react";
|
|
import { hydrateRoot } from "react-dom/client";
|
|
|
|
// work around for react 18 + cypress problem - https://github.com/remix-run/remix/issues/2570#issuecomment-1099696456
|
|
if (process.env.NODE_ENV === "test") {
|
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
require("react-dom").hydrate(<RemixBrowser />, document);
|
|
} else {
|
|
hydrateRoot(document, <RemixBrowser />);
|
|
}
|