From 0815ad4ff386f1bf097c70385e5b3feb00577db1 Mon Sep 17 00:00:00 2001 From: Wojciech Maj Date: Tue, 22 Oct 2024 09:07:22 +0200 Subject: [PATCH] Add a note regarding swcMinify: false required on Next.js prior to v15 --- packages/react-pdf/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/react-pdf/README.md b/packages/react-pdf/README.md index 025808f3a..fb541004d 100644 --- a/packages/react-pdf/README.md +++ b/packages/react-pdf/README.md @@ -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.