moo icon indicating copy to clipboard operation
moo copied to clipboard

Provide ESM bundle

Open marvin-j97 opened this issue 1 year ago • 4 comments

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.

marvin-j97 avatar Jul 14 '23 15:07 marvin-j97

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

tjvr avatar Sep 27 '23 18:09 tjvr

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"

nathan avatar Sep 28 '23 18:09 nathan

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..?

mb21 avatar Feb 01 '24 15:02 mb21

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

import {compile} from 'moo';

johndeighan avatar Feb 13 '24 22:02 johndeighan