hughsk / disc

:chart_with_upwards_trend: Visualise the module tree of browserify project bundles and track down bloat.
http://hughsk.io/disc
Other
1.33k stars 83 forks source link

fix npm 3 module resolution #59

Closed yoshuawuyts closed 7 years ago

yoshuawuyts commented 7 years ago

I propose we switch to use https://github.com/npm/read-package-tree so we can correctly parse npm 3's dependency tree

yoshuawuyts commented 7 years ago

derp, that won't work tho - digging in further.

yoshuawuyts commented 7 years ago

ok, can't find a bug in the code. Looks like we're doing everything by the textbook. E.g.

  1. get a browserify bundle
  2. parse it with https://github.com/substack/browser-unpack which gets the filepaths, deps and stuff
  3. filter and shape as a tree that can d3 can parse

It seems browserify's full path algorithm needs tweaking if it's not going well; the relationship between deps and the like should just work hmmm

yoshuawuyts commented 7 years ago

lol ok everything actually works as expected. Seems like this is no longer an issue :sparkles: yay

hughsk commented 7 years ago

Haha! Adding you to the repo for posterity :)

yoshuawuyts commented 7 years ago

:D

On Mon, Jan 9, 2017, 08:15 Hugh Kennedy notifications@github.com wrote:

Haha! Adding you to the repo for posterity :)

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/hughsk/disc/issues/59#issuecomment-271222550, or mute the thread https://github.com/notifications/unsubscribe-auth/ACWlelHOnrdheMvWzf5ILb5DX-YIAnjKks5rQd6sgaJpZM4LdzRn .