Skip to content

Upgrade guide from version 9.x to 10.x

Wojciech Maj edited this page Jun 26, 2025 · 4 revisions

React-PDF is now shipped as ESM-only.

No action should be required, but there is an error that's likely to pop up if you still run your tests using Jest:

SyntaxError: Unexpected token 'export'

While it is possible to work around this issue by adjusting transformIgnorePatterns and/or enabling experimental ECMAScript modules support, I wholeheartedly recommend you migrating to Vitest. You'll see this error popping up more and more often as the industry migrates towards ESM future. Save yourself the trouble.

In Next.js, you may change the way you load the module that imports react-pdf

When using Next.js Pages Router, we always recommended to skip SSR when importing the module you're using this code in.

Now, the same practice is recommended for App Router as well.

Dropped support for older browsers and Node.js versions

No action is required, but you should be aware that older browsers may not work correctly or even at all.

Please note that following PDF.js's lead, React-PDF will now guarantee to support only the latest versions of all major modern browsers.

Clone this wiki locally