Skip to content

Support Yarn Workspaces #1391

@k15a

Description

@k15a

Yarn has a feature called workspaces which is quite good for monorepos.

The problem is that they are not working well with flow and flow-typed. There are two options to use flow in a monorepo:

Use a single flow in the root

The problem is that flow will only use the flow-typed folder in the root so all typings installed in the individual package folders are ignored.

Flow-typed could install all typings into the root and check for the workspaces key in the package.json for individual packages. (This will probably be an issue when package A depends on a different version of an npm package than package B)

Use one flow per package

The problem here is that yarn will hoist some packages into the root of the project and flow can't find them there. This is a problem with flow because it seems that they use a different module resolution algorithm then node does. facebook/flow#5107

Metadata

Metadata

Assignees

Labels

cliRelated to CLI toolenhancementAn addition to an existing component

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions