node-ebnf icon indicating copy to clipboard operation
node-ebnf copied to clipboard

Build as ESM and improve tree-shakeability

Open GerkinDev opened this issue 4 years ago • 0 comments

Hi there!

I'm using this package on the front-end, and want to optimize my bundles sizes. In order to do so, I would need this package to be exported as an ES module that can be tree-shaken for unused stuff.

I can do a PR to build this package as both CJS and ESM, and configure proper exports. Most things should be backwards-compatible, with the exception of the Grammar exports where each grammar would be exported separately. This would allow unused grammars to be removed. Typescript support would be keept, of course.

What do you think about this?

GerkinDev avatar Sep 13 '21 23:09 GerkinDev