I’m trying to use Rollup to bundle a small sample scene I’ve made with Babylon React Native. I did manage this, but when looking at the bundle I noticed that my files were over 200.000 lines long.
I was thinking I did something wrong that made it include a whole lot more than it needed and stuff I never use.
But then I found this: Babylon.js ES6 support with Tree Shaking | Babylon.js Documentation
which said: “As a result, it is impossible for Webpack and the other bundlers to determine if imports are safe to be removed when not used so if you import directly from index, all the imports will be followed and included in your packages.”
Does this mean that my bundle cannot be smaller than 200.000 lines? Or am I doing something wrong in my configuration?