wmr
wmr copied to clipboard
Packages are installed twice if used in yarn workspace
In yarn workspaces, all packages are installed in the node_modules folder of the workspace, not in each project's folder. Because of this, what I think is happening is that WMR is looking at the node_modules inside the project folder and because it doesn't find the requested packages there, it downloads them.
Interesting - I had assumed Yarn Workspaces would be setting up symlinks for this, but I guess they're relying on Node resolution looking into parent directories' node_modules. A prerequisite to WMR supporting this would be moving our npm cache files out of node_modules/*/.cache, which is something we already need to do in order to avoid writing to npm link'd project directories.