the problem is clear:
invoices.html:377 Error: No "GlobalWorkerOptions.workerSrc" specified.
at PDFParse.load (PDFParse.ts:186:25)
at PDFParse.getText (PDFParse.ts:155:26)
at parsePdf (invoices.html:289:35)
at handleFile (invoices.html:368:32)
this can easily be resolved by using import.meta.resolve to resolve the path relative to itself.
devs should not have to care about this things.
new Worker(import.meta.resolve('./worker.js'))
the problem is clear:
invoices.html:377 Error: No "GlobalWorkerOptions.workerSrc" specified.
at PDFParse.load (PDFParse.ts:186:25)
at PDFParse.getText (PDFParse.ts:155:26)
at parsePdf (invoices.html:289:35)
at handleFile (invoices.html:368:32)
this can easily be resolved by using
import.meta.resolveto resolve the path relative to itself.devs should not have to care about this things.