-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tree-shaking: ShaderLib and UniformsLib #24221
Tree-shaking: ShaderLib and UniformsLib #24221
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it helps improving tree-shaking, I'm fine with this PR.
That said, I'm a bit frustrated with cluttering the code base with annotations and refactoring easy-to-read code to something more incomprehensible 😞 . However, seems like there is no way around it if we want smaller bundles.
@Mugen87 I agree, I hate adding It would require a pretty major re-write though, and everything would need to be self-contained classes. I should also point-out there is a way around it, exporting your source files as the library entry point. These are all flat bundle problems. See #24006 (comment) 😜 |
Thanks! |
* Tree-shaking: ShaderLib and UniformsLib * Tree-shaking: ShaderLib and UniformsLib pure annotations * Tree-shaking: ShaderLib and UniformsLib switch back to object literal
* Tree-shaking: ShaderLib and UniformsLib * Tree-shaking: ShaderLib and UniformsLib pure annotations * Tree-shaking: ShaderLib and UniformsLib switch back to object literal
Related issue: #24199
Troubleshooting the remaining side-effects,
converted bothadded pure annotations.ShaderLib
andUniformsLib
to static class fields for discussion