Initializing DPC in your entry point
In Next.js you can make sure code is only executed client-side by checkingtypeof window !== "undefined"
. Since we are importing DPC as a module we can’t do it the with the normal import { DPC } from "depict-ai/dpc"
syntax. Instead, we can use dynamic imports. This is also documented by Next.js.
TypeScript