This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
How to share scripts between projects in a workspace? #2405
Labels
You can continue the conversation there. Go to discussion →
In the pnpm monorepo, we copy/paste the same scripts to almost every project. There should be a better way to do this.
Yarn solved this with constraints. For instance, this is how they generate the prepack scripts:
https://github.com/yarnpkg/berry/blob/20a3fdfe6ef88bf611a5b3af21abe24c86add204/constraints.pro#L62-L69
We don't have constraints support though. And seems like not everyone is currently happy with Yarn's constraints, as they are written in Prolog.
Maybe we could come up with something like a "baseScripts", which are inherited by each workspace project.
related: #1813
The text was updated successfully, but these errors were encountered: