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 2bedd7b commit fc1a760
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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 = `//cdnjs.cloudflare.com/ajax/libs/pdf.js/${pdfjs.version}/pdf.worker.min.js`
pdfjs.GlobalWorkerOptions.workerSrc = `//mozilla.github.io/pdf.js/build/pdf.worker.mjs'`

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

0 comments on commit fc1a760

Please sign in to comment.