When developing a node module in Typescript and preparing it for publishing, I have the option to publish only the transpiled (obfuscated) code contained in the /dist
folder. Alternatively, I can also choose to publish the original code found in either the /src
or /lib
folders.
- If I opt to publish only obfuscated code, the library will be more compact but less transparent, functioning as more of a
blackbox
. - On the other hand, if I decide to publish both obfuscated and original code, the library will be larger but users will have the ability to delve into the code, debug, study, understand it, and even view comments.
What is considered the more traditional approach in this scenario? I have come across modules that include original code as well as those that do not.
Are there established standards regarding this practice? Is a node module containing original Typescript code inherently less production ready
?
Thank you.