Package size increased a lot
Describe the bug
xeokit-sdk.es.js sizes:
1.9.0: 1.2 MB
2.0.0: 3.6 BM
2.0.13: 4.9BM
2.1.0: 5.2 MB
2.2.0: 5.3 MB
This leads more js to load at page loading, more code parsing. I've seen many new loaders plugins coming with big dependencies and they are loaded even if we don't use them
Are you really loading the entire xeokit-sdk library into your app though?
When building all into a single library, I had expected users to use include, with tree shaking etc.
In any case, I'll look into separating out the plugins at some point soon.
I discovered https://github.com/btd/rollup-plugin-visualizer and used it on xeokit:
You can unzip and open the stats.html file in your browser to explore
stats.zip
Are you really loading the entire xeokit-sdk library into your app though?
No, but I think there is a conflict between what you say here and the package.json
The package.json doesn't expose src/ files. The tree-shaking doesn't work with the single .js built file.
Users must fork xeokit and change the package.json if they don't want to load everything.
Adding src/ to package.json's files would allow doing import {Viewer} from "@xeokit/xeokit-sdk/src/viewer/Viewer.js" to cherry-pick what needs to be embedded in app.
(We do fork xeokit and change the package.json/remove unused stuff, so it's not a priority issue for us)
See #1151 Released in 2.4.0-alpha-82