yortus / require-self

Lets you require('foobar') from within foobar itself
MIT License
19 stars 5 forks source link

Include this kind of feature directly in node #16

Closed rom1504 closed 4 years ago

rom1504 commented 4 years ago

I feel the feature of this module is something that is missing from node.js itself. Do you have any idea if there is any open issue to solve that situation directly in node so this module is not needed ?

yortus commented 4 years ago

Good question. I highly doubt node.js would change its CommonJS module system now, since it's marked stable and things are moving towards ESM anyway.

Something like Import Maps would resolve this. Or for node.js specifically, a package.json "imports" field.

In any case, there's nothing actionable here for this project, so closing.