kolodny / wavy

use ~ in require and import calls
378 stars 20 forks source link

Bug: breaks when a dependency uses wavy #15

Closed keenahn closed 7 years ago

keenahn commented 7 years ago

Package A requires wavy Package B requires Package A Package A breaks because the ~ points to Package B in the flat node_modules directory

Tested with npm and yarn

keenahn commented 7 years ago

For anyone else who lands here, I have refactored all my code to use https://www.npmjs.com/package/app-module-path

kolodny commented 7 years ago

Yeah, sorry about the slow response, this package has some serious limitations esp with the flattened by default npm mechanism. This package only really works on the top level of an app. Put another way, there shouldn't be any published modules that use this, and this module shouldn't be a transitive dependency. I've tried unsuccessfully to iron that issue out but had no real success. If you have any ideas about how to fix that feel free to open a PR