The current implementation noops if it finds a "local" copy of the file at the exact same path as the "global" one (i.e. when the file actually was installed locally). This diff maintains that behavior, but also noops if the filename is installed anywhere under the local node_modules. Now calling importLocal on a file that is aliased inside local node_modules is guaranteed to do nothing.
Fixes #1.
The current implementation noops if it finds a "local" copy of the file at the exact same path as the "global" one (i.e. when the file actually was installed locally). This diff maintains that behavior, but also noops if the filename is installed anywhere under the local
node_modules
. Now callingimportLocal
on a file that is aliased inside localnode_modules
is guaranteed to do nothing.