Recommendations on exporting multiple functions in a utility library #713
Labels
kind: question
This is a usage or similar question
kind: support
Asking for support with something or a specific use case
Not sure if this is a general javascript/typescript question or a tsdx question, but I needed to create a
@my-org/common
utility package (custom formatting, validation, some special array functions, etc., etc.), and, well, I've hit at least more than 1 of the "things to screw up" with no idea of how to do it right.So, tsdx looks promising, but I have a question about how one would write/structure a general utility library. What does one do about the main
index.ts
file? Especially in relation to tree-shaking and other related things.Do I need to export every single utility function from
index.js
? And if not, how would one import one of these functions?I've tried to look for examples, but most seem to be single function or simple react component type packages, where of course the main
index.ts
makes perfect sense. 🤔The text was updated successfully, but these errors were encountered: