Skip to content

Build not working with Next 15 #1841

@ivanpajon

Description

@ivanpajon

Before you start - checklist

  • I followed instructions in documentation written for my React-PDF version
  • I have checked if this bug is not already reported
  • I have checked if an issue is not listed in Known issues
  • If I have a problem with PDF rendering, I checked if my PDF renders properly in PDF.js demo

Description

Configuration for using workerSrc in Next is not working. In local development with next dev is working, but when you try to do next build it fails.
With the example of the sample projects also fails.

Steps to reproduce

  1. Try to do next build

Expected behavior

  1. It compiles and runs fine

Actual behavior

  1. It fails in building process

Additional information

Here is a sample repo. But literally you can use the official I mentioned above. And it fails with and without turbo mode enabled.

Environment

  • Browser (if applicable): Any
  • React-PDF version: 9.1.0
  • React version: 18.3.1
  • Bundler name and version (if applicable):

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinginvalidThis doesn't seem right

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions