Tree-shaking improvement #1865
Labels
module: build
released
Automated label
status: confirmed
Could be reproduced by a main contributor
type: feature request 💡
Desired capabilities / enhancements
We have an app that uses vtk.js to render meshes and the bundle is produced by webpack, the analyze shows that some pieces of vtk.js are included in the bundle even if they are not used or called in the app.
So basically
OpenGL/RenderWindow
callsOpenGL/ViewNodeFactory
which instantiate classes even if they are not used the app, i can list :is there something we can do in vtk.js to improve this part?
Also i can see the import of vtkMath which is 20kb
instead of the individual functions
https://github.com/Kitware/vtk-js/blob/master/Sources/Rendering/OpenGL/ViewNodeFactory/index.js#L48-L89
The text was updated successfully, but these errors were encountered: