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 not work for windows when gloab module and local module in different drive #10

Closed slgluo closed 3 years ago

slgluo commented 3 years ago

As mentioned in the title, in this line: const filenameInLocalNodeModules = !path.relative(localNodeModules, filename).startsWith('..'); filenameInLocalNodeModules always true,because path.relative(localNodeModules, filename) always return filename. However, it is a absolute path and it does not start with “..”

sindresorhus commented 3 years ago

Duplicate of https://github.com/sindresorhus/import-local/pull/9