I'm migrating from yarn 1.xx to yarn 3 and I'm currently having a workspaces definition with nohoist configuration in my package.json:
"workspaces": {
"packages": [
"packages/*"
],
"nohoist": [
"**/react-router-dom",
"**/react-router"
]
},
the new version of yarn does not support the nohoist feature the way it used to in previous version.
Yarn 3 has this nmHoistingLimits config which has only 3 options (workspaces , dependencies, none) - the only option to no-hoist a dependency inside a workspace (i.e. a package module in the monorepo) is to use the workspaces option but then each workspace (i.e. a package module) has its own node_modules folder, while their dependencies are hoisted to the root’s node_modules.
I ended up with a lot of common dependencies not hoisted up to the root. does anyone found a workaround for it? How can I get the following functionality, where I can no-hoist only certain dependencies?