mikecousins/react-pdf-js

Lazy loading issues

Closed this issue · 1 comments

Looks like lazy loading is erroring out with the PDF worker. Is there a workaround?

Example

const ReactPDF = lazy(() =>
  import(/* webpackChunkName: 'ReactPDF' */ '../path/to/my/pdf/component)
)

Calling this within suspense will result in a lazy load chunk error.

Let me know if this is working now. It's a pretty different architecture now.