Smallest possible build #1685
Replies: 4 comments 2 replies
-
Probably not.
So its possible if someone performs their own bundling with a smart bundler (tree-shaking) that a smaller bundle would be created per specific use case. I believe lodash have implemented a way to import specific properties to help bundling tools produce a smaller
That is a bit tricky, Chevrotain performs the validations during Parser initialization as there is no grammar generation phase. The reasons it becomes tricky is that some validations can be optionally skipped, e.g: run those only during local testing, but no in production, but this is a dynamic option and the bundlers use static analysis.
What is Brotli ? is it an alternative and more aggressive bundling tool? |
Beta Was this translation helpful? Give feedback.
-
Thanks so much for quick a detailed response. Brotli is a modern compression algorithm supported by recent browsers. I think unpkg is already using it, but not with the maximum compression setting. I will give a custom build a shot once my grammar is closer to ready. Seems there is quite a lot that can be omitted with a little effort. Thanks again |
Beta Was this translation helpful? Give feedback.
-
Thanks for the info on Brotli.
Please share if/when you have additional info/insights. 👍 I am interested to understand, in what scenario does it it important if a library is 30.5k compressed or 15k compressed? |
Beta Was this translation helpful? Give feedback.
-
I started #1697 to track this |
Beta Was this translation helpful? Give feedback.
-
Hey there,
Is the min.js build on unpkg.com the smallest possible build? I notice it includes all the validation code. Has anyone tried a build configuration omitting that code entirely? With Brotli the client footprint is about 30.5kb using the unpkg build
Beta Was this translation helpful? Give feedback.
All reactions