Fix pnpm support in Sanity example (#63249)
As `@sanity/preview-url-secret` wasn't declared as a dependency when
doing:
```bash
pnpm install && pnpm build
```
It would fail to compile:
```bash
Linting and checking validity of types .Failed to compile.
./app/api/draft/route.tsx:6:36
Type error: Cannot find module '@sanity/preview-url-secret' or its corresponding type declarations.
4 | */
5 |
> 6 | import { validatePreviewUrl } from "@sanity/preview-url-secret";
| ^
7 | import { draftMode } from "next/headers";
8 | import { redirect } from "next/navigation";
9 |
```
Showing
Please
register
or
sign in
to comment