Rich-Harris / agadoo

Check whether a package is tree-shakeable
MIT License
535 stars 17 forks source link

Agadoo doesn't work with Yarn workspaces #6

Open Kmaschta opened 5 years ago

Kmaschta commented 5 years ago

Hi. This package idea is excellent!

Sadly, I have a small issue: I can't use this lib inside a Yarn workspace because it get the wrong package.json.

Say I have the following tree:

If I run agadoo on for mylib like:

cd packages/mylib
yarn add -D agadoo
./node_module/.bin/agadoo

If get the following error message:

'PWD/packages/mylib' is imported by virtual:__agadoo__, but could not be resolved – treating it as an external dependency
import './';

Failed to tree-shake