IssueRaiser

[RRFC] Add nohoist option for workspaces

<!-- # Before Opening Please... - [x] Search for an existing/duplicate RRFC which might be relevant to your RRFC --> ## Motivation ("The Why") Yarn already supports this option. It makes it possible to work with tooling that expects certain modules to be located in inside the same package that consumes them. ### Example In order for a React Native app to build properly within a monorepo, some packages that react-native depends on must reside inside the node_modules folder within the app package. With yarn, I'm able to accomplish it with this configuration: ```jsonc "workspaces": { "packages": [ "api", "app", "shared/*" ], "nohoist": [ // my-app is the name of the package inside the app folder "my-app/**" ] } ``` ### How See: https://classic.yarnpkg.com/blog/2018/02/15/nohoist/ ### References * Related to: [npm/cli#2036](https://github.com/npm/cli/issues/2036#issuecomment-718171025)

Posted by socialwyze-franklin on Nov 11, 2020, 7:53 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.3,000 issues0 comments

github (SaaS)

[RRFC] Add nohoist option for workspaces

socialwyze-franklinNov 11, 2020, 7:53 PM

<!-- # Before Opening Please... - [x] Search for an existing/duplicate RRFC which might be relevant to your RRFC --> ## Motivation ("The Why") Yarn already supports this option. It makes it possible to work with tooling that expects certain modules to be located in inside the same package that consumes them. ### Example In order for a React Native app to build properly within a monorepo, some packages that react-native depends on must reside inside the node_modules folder within the app package. With yarn, I'm able to accomplish it with this configuration: ```jsonc "workspaces": { "packages": [ "api", "app", "shared/*" ], "nohoist": [ // my-app is the name of the package inside the app folder "my-app/**" ] } ``` ### How See: https://classic.yarnpkg.com/blog/2018/02/15/nohoist/ ### References * Related to: [npm/cli#2036](https://github.com/npm/cli/issues/2036#issuecomment-718171025)

Comments (0)

No comments yet. Start the discussion.

Comment on this issue