Hey guys. Dummy question here… I’m using a mono-...
# random
a
Hey guys. Dummy question here… I’m using a mono-repo, where I have a
data
folder, which is shared with all my lambdas. This folder contains all the Entities to connect to DB, etc. The thing is… every time I modify an entity there, all my lambdas gets updated (due most of them use almost 1 entity from this package). Is there a way to do tree-shaking, or whatever magic, to left my lambdas with only the classes that are imported and not the entire dependency package? If we have static references to each file/dependency, why this can not be done?
t
Think what you're running into is esbuild not treeshaking re-exports
a
Yes, but is there a way for esbuild to do this?
t
Here's a recent thread on this
It's a limitation in esbuild at the moment