We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0c9c1ab commit 29111e5Copy full SHA for 29111e5
packages/react-notion-x/src/third-party/pdf.tsx
@@ -2,7 +2,7 @@ import * as React from 'react'
2
import { Document, Page, pdfjs } from 'react-pdf'
3
4
// ensure pdfjs can find its worker script regardless of how react-notion-x is bundled
5
-pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/legacy/build/pdf.worker.min.js`
+pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/legacy/build/pdf.worker.min.mjs`
6
7
export function Pdf({ file, ...rest }: { file: string }) {
8
const [numPages, setNumPages] = React.useState<number>(0)
0 commit comments