Skip to content

webworker problem react / vite #245

@gandarufu

Description

@gandarufu

I cannot get pdf-to-img working, I get the following error
The file does not exist at "/node_modules/.vite/deps/build/pdf.worker.mjs?worker_file&type=module" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to optimizeDeps.exclude.

In another project I solved it by importing
import * as pdfjsLib from "pdfjs-dist/webpack";

Would that be an option?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions