Closed anandthakker closed 5 years ago
Ah, looks like pirates uses some es2015 features that aren't supported in node 0.10/0.12 🤷♂️
Node 0.10 and 0.12 are no longer supported by Node and haven't been since 2016.
We should definitely have this. Seems like it would be pretty safe to drop Node 0.10 and 0.12 support as part of the v2 release I'm planning. Thanks @anandthakker! Apologies for how long it's taken us to look at this PR.
Per https://github.com/standard-things/esm/issues/119, this PR uses pirates to register the require hook instead of patching it in directly.
Advantage: better interoperability with other require hooks Disadvantage: adds a (small) dependency