diff --git a/src/renderers/pdf/index.tsx b/src/renderers/pdf/index.tsx index 94e0daa..0a516aa 100644 --- a/src/renderers/pdf/index.tsx +++ b/src/renderers/pdf/index.tsx @@ -7,7 +7,8 @@ import { PDFProvider } from "./state"; import { pdfjs } from "react-pdf"; pdfjs.GlobalWorkerOptions.workerSrc = new URL( - `https://unpkg.com/pdfjs-dist@${pdfjs.version}/build/pdf.worker.min.mjs`, + `pdf.worker.mjs`, + import.meta.url, ).toString(); const PDFRenderer: DocRenderer = ({ mainState }) => { diff --git a/tsconfig.json b/tsconfig.json index bc40bf4..8408b56 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,7 +7,9 @@ "skipLibCheck": true, "noEmit": true, "resolveJsonModule": true, - "types": ["vitest/globals"] + "moduleResolution": "node", + "types": ["vitest/globals"], + "module": "esnext" }, "exclude": ["node_modules", "use-cases"] }