Question about yarn3 deprecated "nohoist" option. #5459
Unanswered
hindicator
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I understand that the "nohoist" option has been deprecated in yarn3
because it was a hacky workaround for react-native.
I'm facing a problem about migrating a big repo from yarn1 to yarn3.
For example :
I have 2 workspaces in a monorepo,
Workspace A - include some package that require webpack v5 (and @types/webpack v5)
Workspace B - include some package that require webpack v4 (and @types/webpack v4)
with the "nohoist" option we was able to declare that @types/webpack packages won't be hoisted at all.
nmHoistingLimits: workspaces
option in yarnrcor
installConfig.hoistingLimits
Didn't help.
Only option I see is to include this on both packages (which will lost the advantage of monorepo).
Build is fail because @types/webpack is on root node_modules,
even when the package in Workspace B has
"hoistingLimits": "workspaces"
Any thoughts ?
Thanks.
I'd be willing to implement this :)
Beta Was this translation helpful? Give feedback.
All reactions