Skip to content

Support for Yarn workspaces/monorepos #42

@dinvlad

Description

@dinvlad

First of all, thanks for the awesome work on this package!

I've started exploring the new "workspaces"/"monorepos" feature of Yarn (https://yarnpkg.com/blog/2017/08/02/introducing-workspaces/), which enables "hoisting" of all node_modules from any sub-projects to a single parent repository (so that if you have sub-folders with individual package.jsons, each one would install its deps in the "parent" node_modules and link them, unless there are version conflicts).

However, patch-package no longer automatically applies patches to sub-project packages in its default configuration (i.e. when I run yarn in the parent folder, it only applies patches/ from the "parent" folder). I had to move all patches from sub-projects into the "parent" patches/ to make it work, however that sort of "pollutes" the "global" patch space with patches from sub-projects.

Are you familiar with this feature, and are there any other (better) solutions to enable automatic patching of sub-projects (I know it's a lot to ask, was just hoping to hear your thoughts)?

Thanks again!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions