Skip to content

Commit

Permalink
Expand note on Next.js compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj committed Aug 1, 2023
1 parent e8398bb commit 96439c2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ pdfjs.GlobalWorkerOptions.workerSrc = new URL(
```

> **Note**
> In Next.js using App Router, make sure to add `'use client';` to the top of the file.
> In Next.js:
>
> - Using App Router, make sure to add `'use client';` to the top of the file.
> - Using Pages Router, make sure to [disable SSR](https://nextjs.org/docs/pages/building-your-application/optimizing/lazy-loading#with-no-ssr) when importing the component you're using this code in.
> **Note**
> pnpm requires an `.npmrc` file with `public-hoist-pattern[]=pdfjs-dist` for this to work.
Expand Down

0 comments on commit 96439c2

Please sign in to comment.