Yarn 3 Workspace resolutions

222 Views Asked by At

I'm building a component library in React using Yarn v3 Workspaces to manage my mono-repo. One of the workspaces within the mono-repo is for a Storybook application and I need to pin the version of one of its transitive dependencies due to a bug.

Yarn documentation suggests you can pin a version by defining a resolutions section in your package.json. I have tried doing this in both the Storybook workspace package.json and the mono-repo root-level package.json like so:

  // Root-level package.json
  
  "resolutions": {
    "**/enhanced-resolve": "5.10.0"
  }

Or

// Storybook workspace level package.json

  "resolutions": {
    "enhanced-resolve": "5.10.0"
  }

Neither of the above seem to work. Any ideas?

0

There are 0 best solutions below