Comments (4)
Hey there, sorry for taking so long!
https://github.com/Fiattarone/unpdf-plasmo-example under core/test.ts is where I put it
Or, even easier to reproduce with a one-liner:
git clone [email protected]:Fiattarone/unpdf-plasmo-example.git --recurse-submodules &&
cd unpdf-plasmo-example &&
pnpm install &&
pnpm dev
fails upon compiling
If this is more of an issue with plasmo, I'll take it up with them--just let me know!
from unpdf.
Mmh, interesting. Which bundler does Plasmo use? unpdf
provides a sub path export unpdf/pdfjs
:
Line 34 in f640d4d
Seems to me more like a Plasmo issue than unpdf. I have tested unpdf with esbuild, Rollup and more, which all correctly bundle unpdf/pdfjs
.
Could you please provide a reproducible example?
from unpdf.
Bundler used is https://parceljs.org/ I believe... I know that I couldn't get plasmo to work with pdfjs either, so this very well could be a plasmo issue.
Will drop an example in here when I get a moment, sorry about not including that the first round.
My current workaround is to use unpdf on my proxy (vercel) server (normally used for other things) but this is really just to continue development, it would be really not-prime to handle everyone's PDF shenanigans when they could be doing it themselves on the client side.
from unpdf.
Hi @Fiattarone, thanks for the reproduction. I tried to import the pdfjs
subpath export, but somehow the Parcel bundler doesn't seem to resolve the dependency. A quick look at Parcel's dependency resolution docs didn't help.
Even if we point to the PDF.js source file, the bundler fails to locate it:
import { configureUnPDF, extractText } from "unpdf"
configureUnPDF({
pdfjs: () => import("unpdf/dist/pdfjs.mjs"),
});
Sorry, but at the moment, I don't have a fix for the Plasmo framework. Noted that Vite (using Rollup) and esbuild correctly resolves the import…
from unpdf.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unpdf.