FormidableLabs / inspectpack

An inspection tool for Webpack frontend JavaScript bundles.
MIT License
592 stars 20 forks source link

Bug: fix path to package inference #62

Closed ryan-roemer closed 6 years ago

ryan-roemer commented 6 years ago

Originally, a simple substr of the identifier (unprocessed) from the (processed) baseName was used to slice off the part of a full path to a node_modules file. This ended up with incorrect paths to modules.

Now, we actually split then rejoin the path more reliably.

Also adds some test fixtures and does some futzing to baseName for synthetic modules.