Closed
Description
Had a bug report for one of my module due to resolution issues. Specifically the below doesn't work
{
"exports": "lib/index.js"
{
But the below does
{
"exports": "./lib/index.js"
}
This is inconsistent with the behavior of main where the ./
is not required in relative paths.
To make matters even more confusing there is no failure when attempting to load a module as self-referential.
TBH this seems like a bug. Even if it was intentional design it is very easy to get wrong and was hard to debug.
/cc @nodejs/modules thoughts?