browserify / resolve

Implements the node.js require.resolve() algorithm
MIT License
776 stars 184 forks source link

[New] add default support for `paths` to include `$HOME/.node_{modules,libraries}` #273

Closed ljharb closed 2 years ago

ljharb commented 2 years ago

Note, this is a rarely used feature that should be aggressively avoided, but it‘s important to minimize gaps between node and this package.

Fixes #163.

I'm uncertain if I'll backport this to the 1.x branch, primarily because of the risk of unintentional breakage. However, since virtually nobody is going to be using these directories, and since it's only going to potentially start resolving bare specifiers where previously there was an error, this does seem safe.

mk-pmb commented 2 years ago

Results are in, perfect score. :+1:

ljharb commented 2 years ago

Released in v1.22.0, and will also be included in the next v2 prerelease.