ojkelly / yarn.build

Build 🛠 and Bundle 📦 your local workspaces. Like Bazel, Buck, Pants and Please but for Yarn Berry. Build any language, mix javascript, typescript, golang and more in one polyglot repo. Ship your bundles to AWS Lambda, Docker, or any nodejs runtime.
https://yarn.BUILD
MIT License
326 stars 28 forks source link

Tree Shaking #272

Closed patrickml closed 5 months ago

patrickml commented 7 months ago

I have been unable to find any information on tree shaking when it comes to using yarn build. I noticed that when I switched to using the ESM modules our memory footprint is much higher. I am curious what others are doing for tree shaking with yarn.build and Typescript + ESM.

ojkelly commented 5 months ago

yarn.build operates at the package.json#scripts level, in that we're effectively orchestrating which package's scripts to call, and what order we need to do that in.

There's nothing specific to yarn.build regarding typescript+esm, that's all left up to the bundler you're using.