
ESM modules in node: NPM edition - deckar01
https://gist.github.com/ceejbot/b49f8789b2ab6b09548ccb72813a1054
======
deckar01
Node implemented native ES modules behind a feature flag, but it is just
awful. They introduced a new file type ".mjs" that gets special handling and
has a bunch of arbitrary rules that determines how they can interact with
normal node modules. I though I had been following this discussion, but this
slipped under my radar for months. For some reason they felt the need to cater
to some bizarre dynamic async importing edge cases that no one actually needs.

There are better solutions and NPM developers have implemented one to prove
that it just works. It's OK to raise an exception at runtime when a developer
tries to do something ridiculous.

