Closed brandonros closed 1 year ago
This definitely isn't a good approach to provide native ESM modules.
What I'm wondering is why you're not bundling anyways - there's tons of performance benefits to using bundles that simply aren't available with native ESM.
Wow, I'm sick of projects not shipping proper ES6 files.
This PR is a giant time saver, thank you so much! I was about to do the same thing for my project :sweat: :sweat_drops: :face_with_head_bandage:
What I'm wondering is why you're not bundling anyways - there's tons of performance benefits to using bundles that simply aren't available with native ESM.
It's mostly about developing and debugging. Once that is done, you can create sweat, fast, mangled, compressed, tersed, tree-shaked and whatnot bundle... but don't eat that thing during development!
And especially don't provide that as the only option while feeling righteous about it!
I suggest to make ES6 a top-priority for a while - learn from people who know how to ship NPM packages, like the Monaco team.
part of https://github.com/facebook/prop-types/issues/111
allows for
i'm not saying we should actually merge this, just hopes it helps somebody else out there