You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ENOENT: no such file or directory, open '[REDACTED]/customReport/src/pdfjs-dist/build/pdf.worker.mjs' [plugin raw]
src/Widget.tsx:8:25:
8 │ ...kerSrc from 'pdfjs-dist/build/pdf.worker.mjs?raw';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This error came from the "onLoad" callback registered here:
../../node_modules/esbuild-plugin-raw/dist/index.js:52:12:
52 │ build.onLoad({ filter: /\?raw$/, namespace:...
╵ ~~~~~~
What I think is going on is the onResolve handler in this plugin is interpreting pdfjs-dist/build/pdf.worker.mjs?raw as a relative module import rather than an absolute one from node_modules.
I've amended the plugin locally to get it to work but would like to hear your thoughts? Happy to open a PR if helpful
Describe the bug
I was attempting to read the pdf.js
pdf.worker.mjs
file as a raw string to base64 encode and start a worker. My import statement looked like this:However esbuild failed with this error:
What I think is going on is the
onResolve
handler in this plugin is interpretingpdfjs-dist/build/pdf.worker.mjs?raw
as a relative module import rather than an absolute one from node_modules.I've amended the plugin locally to get it to work but would like to hear your thoughts? Happy to open a PR if helpful
Reproduction
See description
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: