wix / import-cost

displays the import size of the package you are importing inside the code editor
https://marketplace.visualstudio.com/items?itemName=wix.vscode-import-cost
MIT License
1.36k stars 67 forks source link

Not working with Yarn PnP #238

Open dstoyanoff opened 3 years ago

dstoyanoff commented 3 years ago

Hello, I have a project using Yarn workspace with Yarn PnP (no node_modules).

The plugin isn't displaying anything next to the imports.

Yarn: 3.0.1 Node: 16.5.0

NMinhNguyen commented 2 years ago

At a quick glance this is probably due to it expecting dependencies to live in node_modules: https://github.com/wix/import-cost/blob/8dee985c00766fe33beb8bcff97af81420b2e3ff/packages/import-cost/src/utils.js#L33

ko-devHong commented 1 year ago

please fix this issue @yairhaimo @shahata

liamlows commented 1 year ago

Yea can further confirm that this does not work with Yarn PnP. Maybe a setting needs to be added for the extension to look in yarn cache which is where PnP stores dependencies?