Skip to content

Commit 81629d5

Browse files
authored
fix: devtools dependency stripped out in prod (#986)
1 parent de9a786 commit 81629d5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/components/DevTools.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,13 @@ import getStartedStyle from "./GetStarted.module.css"
1515
import styles from "./DevTools.module.css"
1616
import ClipBoard from "./ClipBoard"
1717
import dynamic from "next/dynamic"
18+
import type { DevtoolUIProps } from "@hookform/devtools/dist/devToolUI"
1819

19-
const DevTool = dynamic(
20-
() => import("@hookform/devtools").then((mod) => mod.DevTool),
20+
const DevTool = dynamic<DevtoolUIProps>(
21+
() =>
22+
import("@hookform/devtools/dist/index.cjs.development").then(
23+
(mod) => mod.DevTool
24+
),
2125
{
2226
ssr: false,
2327
}

0 commit comments

Comments
 (0)