diff --git a/src/components/DrawPDFFields/index.tsx b/src/components/DrawPDFFields/index.tsx index 63eb9ee..e98187c 100644 --- a/src/components/DrawPDFFields/index.tsx +++ b/src/components/DrawPDFFields/index.tsx @@ -37,7 +37,7 @@ import { truncate } from 'lodash' import { hexToNpub } from '../../utils' import { toPdfFiles } from '../../utils/pdf.ts' PDFJS.GlobalWorkerOptions.workerSrc = new URL( - 'pdfjs-dist/build/pdf.worker.mjs', + 'pdfjs-dist/build/pdf.worker.min.mjs', import.meta.url ).toString() diff --git a/src/utils/pdf.ts b/src/utils/pdf.ts index 78bab85..28bbfde 100644 --- a/src/utils/pdf.ts +++ b/src/utils/pdf.ts @@ -4,7 +4,7 @@ import { PDFDocument } from 'pdf-lib' import { Mark } from '../types/mark.ts' PDFJS.GlobalWorkerOptions.workerSrc = new URL( - 'pdfjs-dist/build/pdf.worker.mjs', + 'pdfjs-dist/build/pdf.worker.min.mjs', import.meta.url ).toString() diff --git a/vite.config.ts b/vite.config.ts index 4275495..3d09617 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -5,15 +5,6 @@ import tsconfigPaths from 'vite-tsconfig-paths' export default defineConfig({ plugins: [react(), tsconfigPaths()], build: { - target: 'ES2022', - rollupOptions: { - output: { - manualChunks(id) { - if (id.includes('pdfjs-dist/build/pdf.worker.mjs')) { - return 'pdf.worker' - } - } - } - } + target: 'ES2022' } })