Skip to content

Commit

Permalink
feat: pdf worker.mjs
Browse files Browse the repository at this point in the history
  • Loading branch information
wkylin committed Oct 10, 2024
1 parent fc1a760 commit f9b8271
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/reactPdf/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'react-pdf/dist/esm/Page/AnnotationLayer.css'
import 'react-pdf/dist/esm/Page/TextLayer.css'

// Set up the worker for react-pdf
pdfjs.GlobalWorkerOptions.workerSrc = `//mozilla.github.io/pdf.js/build/pdf.worker.mjs'`
pdfjs.GlobalWorkerOptions.workerSrc = `//cdnjs.cloudflare.com/ajax/libs/pdf.js/${pdfjs.version}/pdf.worker.mjs`

function ReactPdf() {
const [numPages, setNumPages] = useState(null)
Expand Down

0 comments on commit f9b8271

Please sign in to comment.