-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with tree-shaking in a project using Libauth #135
Comments
Libauth has |
@paulmillr are you having trouble with Libauth in a particular project? Could you share an example of how you're importing or bundling Libauth? Libauth lightweight in that it is designed to be maximally "tree shaken" by all modern build tooling, so your built project will contain only the code necessary for your application. For example, this demo using Libauth in Vite bundles all of its code, including a Libauth function it uses ( |
This is not a tree shaking issue. This is about misleading documentation. The library — all-in — is 4 megabytes. A similar "lightweight" library could be 500 kilobytes. You're using tree-shaking? Cool. Most libraries are using tree-shaking nowadays. When all features of your library are used, it's still 4 megabytes - not 1.87kb gzipped. The documentation can be adjusted. |
I'm sorry that you're so frustrated with Libauth. It seems like you've had trouble using the Libauth in a project, but I'm afraid I'm still misunderstanding the context for your issue. Can you explain what sort of project you're building? What did you expect the library to do, and what happened when you tried to use it? Are you using If you can provide a little more detail, I'd love to help you debug the issue. |
I've expected the library to be "ultra-lightweight" and "zero-dependency" but in fact it's not. It bundles other libraries such as libsecp256k1 as WASM base64. If by "zero-dependency" you've meant it's "zero NPM dependencies" it should be clarified in README.
The result size of libauth is 1.7MB. The readme claims libauth is "An ultra-lightweight JavaScript library". 1.7 MB of code is not "ultra-lightweight".
I'm building libauth. |
Single-file libauth that weights 1.7MB |
The library bundles libsecp256k1 and a bunch of other libraries. When one includes 10 libraries in the repository, it's not zero deps.
It's misleading to call it "zero dependencies" in README and docs.
The text was updated successfully, but these errors were encountered: