Last active
August 27, 2020 10:41
-
-
Save leventebalogh/b145f88d33e1662cfb601e798ac1d246 to your computer and use it in GitHub Desktop.
How to use "nohoist" in Yarn workspaces for multiple packages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "your-project", | |
"version": "0.0.1", | |
"private": true, | |
"workspaces": { | |
"packages": [ | |
"packages/*" | |
], | |
"nohoist": [ | |
"**/pkgA/**" | |
] | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The goal:
To stop hoisting any dependency under
pkgA
to the root level.Directory structure:
Patterns:
"**"
"pkgA/**"
"**/pkgA/**"
"pkgA"
"**/plugins/pkgA"
"**/plugins/pkgA/**"
More info:
https://classic.yarnpkg.com/blog/2018/02/15/nohoist/