-
Hi all, I was wondering if it's possible in yarn 2 to share dependencies between workspaces. Use case: I use prettier and a few prettier plugins in every workspace. Right now I need to install them in all my workspaces and it feels repetitive. I do have a workspace just for my prettier config where I could install prettier and the plugins. However, I don't think it's possible with strict dependency scoping to run the prettier binary unless it's listed as an explicit dependency by the workspace running the binary. Is it possible to export a binary from a workspace so other workspaces can run it? Are there any other ways I can share these dependencies? I would like to just be able to include all the prettier dependencies as a group rather than individually for every project. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You can create a global script and use that in all the workspaces https://yarnpkg.com/getting-started/qa/#how-to-share-scripts-between-workspaces |
Beta Was this translation helpful? Give feedback.
You can create a global script and use that in all the workspaces https://yarnpkg.com/getting-started/qa/#how-to-share-scripts-between-workspaces