-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
I was investigating my bundle and dependency graph, and I found that this package was taking up a sizable portion. It turns out that even if you use nothing from this package - that is, import "@peculiar/x509" - it still takes almost 200kb!
Some of this is inherent to dependency injection. My tip is that you should avoid dependency injection where it's not needed, and where it's needed, you can explicitly mark it as pure by doing this:
const v = /* @__PURE__ */ (() => {
console.log("impure code");
return "value";
})();so the code can be discarded if its resulting value/class/whatever is unused.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels