no-context / moo

Optimised tokenizer/lexer generator! 🐄 Uses /y for performance. Moo.
BSD 3-Clause "New" or "Revised" License
814 stars 65 forks source link

Provide ESM bundle #185

Open marvin-j97 opened 12 months ago

marvin-j97 commented 12 months ago

Most popular packages have moved on to ESM-only or dual export packages. Moo is still using the old-fashioned UMD format, being not-really-compatible with modern tooling.

tjvr commented 9 months ago

Hi, can you give an example of tooling that is not compatible with Moo today?

nathan commented 9 months ago

I imagine "not-really-compatible" here means "it works completely fine and my packaging script can't exclude compileStates" or "it works completely fine and my editor can't autocomplete the entry point names"

mb21 commented 5 months ago

Yeah, without ESM bundle it cannot be tree-shaken... but looking at the source, I'm not sure how much there could be shaken away anyway..?

johndeighan commented 4 months ago

ESM would allow this, which is a style I use all the time:

import {compile} from 'moo';