Compare commits

..

No commits in common. "88d988e60be3cf86318e612b2aa0835b8b6d8289" and "b0ba2b9b4defedae4ba20da672a93d412a52b153" have entirely different histories.

3 changed files with 5 additions and 18 deletions

View File

@ -36,10 +36,8 @@ import {
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',
import.meta.url
).toString()
PDFJS.GlobalWorkerOptions.workerSrc =
'node_modules/pdfjs-dist/build/pdf.worker.mjs'
interface Props {
selectedFiles: File[]

View File

@ -3,10 +3,8 @@ import * as PDFJS from 'pdfjs-dist'
import { PDFDocument } from 'pdf-lib'
import { Mark } from '../types/mark.ts'
PDFJS.GlobalWorkerOptions.workerSrc = new URL(
'pdfjs-dist/build/pdf.worker.mjs',
import.meta.url
).toString()
PDFJS.GlobalWorkerOptions.workerSrc =
'node_modules/pdfjs-dist/build/pdf.worker.mjs'
/**
* Scale between the PDF page's natural size and rendered size

View File

@ -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'
}
})