sindresorhus / import-local

Let a globally installed package use a locally installed version of itself if available
MIT License
154 stars 11 forks source link

import-local doesn't play well with yarn aliases #1

Closed mxmul closed 5 years ago

mxmul commented 5 years ago

If I have two copies of a dependency some-pkg installed in my project's local node_modules, but one is installed under a different name using a Yarn alias, import-local should noop in the aliased package. Instead, calling import-local in the aliased package actually resolves to the other local installation of the package.

Repro and failing test case is here: https://github.com/sindresorhus/import-local/compare/master...mxmul:yarn_alias_repo

Let me know if there's anything else I can do to help resolve :)