We built our homepage using Babylon.js

Could you please share how much kbs you save using tree shaking? Looks like Babylon combines alll stuff together and it can’t be tree shaking properly

Thanks a lot for the tweet. We thought it was scheduled for later, we didn’t realize you had forgotten :smile:. We really appreciate it, you tweeting about our website is really really cool.

Depends which npm you are using. Even es6 has a legacy import that doesn’t tree shake.

It depends how you write your imports and how much stuff you import. For us it’s gone down to slightly over 1Mb, but the docs says it can go to as little as 700Kb. You have to import the modules from as deep in the tree as possible though, you can’t simply import from ‘@babylonjs/core’. I had commented about some tips on finding the import path a while back, have a look: How can I import BABYLON.Space in ES6 module? - #5 by tibotiber

1 Like