Closed bd82 closed 1 year ago
I think this should be evaluated at April 2023 once nodejs 16 is deprecated and all LTS nodejs versions will support ESM.
Switching to lodash-es and compiling typescript to ESM instead of commonjs seems to reduce the minified bundle size by ~20% (40Kb).
Done in: https://github.com/Chevrotain/chevrotain/pull/1953
I'm still keeping the UMD artifacts (chevrotain.js / chevrotain.min.js) for browser usage. But from nodejs only ESM is supported.
Why
Reduce maintenance overhead of supporting multiple consumption options, currently:
For example Chevrotain currently uses two bundling tools, both
esbuild
andwebpack
When
Likely still too early to do so, need to give the JS / Node community time to adjust. Some popular packages have started doing so already, we should keep track of their progress and/or success in doing so.
How
esbuild