jkrems / proposal-pkg-exports

Proposal for Bare Module Specifier Resolution in node.js
MIT License
129 stars 14 forks source link

Alternative to `/` scoping #18

Closed guybedford closed 5 years ago

guybedford commented 5 years ago

An alternative here could be to use ./ over /:

{
  "exports": {
    "./path": "./path"
  }
}

This might avoid confusion with / meaning the root in the map.

jkrems commented 5 years ago

+1, also nice from a symmetry perspective (even though it's slightly more verbose).

SMotaal commented 5 years ago

I was thinking the exact same thing because “./“ without a path is “/“ whereas “.” could be the root entry “.” should that ever be intended or even be conceivable.

This was in the context of avoiding “” if I am not mistaken, right?

jkrems commented 5 years ago

This happened!