Skip to content

Commit

Permalink
Add a note regarding swcMinify: false required on Next.js prior to v15
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj committed Oct 22, 2024
1 parent 5bcddeb commit 0815ad4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/react-pdf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,14 @@ module.exports = {
};
```

If you use Next.js prior to v15 (v15.0.0-canary.53, specifically), you may need to add the following to your `next.config.js`:

```diff
module.exports = {
+ swcMinify: false,
}
```

### Configure PDF.js worker

For React-PDF to work, PDF.js worker needs to be provided. You have several options.
Expand Down

0 comments on commit 0815ad4

Please sign in to comment.