nodejs/modules

Feature: Polyfillability

GeoffreyBooth opened this issue · 1 comments

  • I’m writing a CommonJS app to run in an old version of Node that lacks modules support, and I want to be able to require an ESM-only package.
  • Same as above, but in a future version of Node that has native modules support.

I think the idea here is that somehow require can be polyfilled in old versions of Node to support importing ESM packages.

Use case 10.

if a version of node has the backend for running esm then it should have whatever other infrastructure we have, otherwise it should be able to use existing solutions right? (i can already override require.extensions to use babel in lots of node versions) plus i don't think we need to worry about versions of node past the oldest lts