Skip to content

Commit

Permalink
Add support for new yarn workspaces config format (facebook#4001)
Browse files Browse the repository at this point in the history
  • Loading branch information
detrohutt authored and akstuhl committed Mar 15, 2018
1 parent 7fb71e7 commit fc13648
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/react-dev-utils/workspaceUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ const findPkgs = (rootPath, globPatterns) => {
const findMonorepo = appDir => {
const monoPkgPath = findPkg.sync(path.resolve(appDir, '..'));
const monoPkg = monoPkgPath && require(monoPkgPath);
const patterns = monoPkg && monoPkg.workspaces;
const workspaces = monoPkg && monoPkg.workspaces;
const patterns = (workspaces && workspaces.packages) || workspaces;
const isYarnWs = Boolean(patterns);
const allPkgs = patterns && findPkgs(path.dirname(monoPkgPath), patterns);
const isIncluded = dir => allPkgs && allPkgs.indexOf(dir) !== -1;
Expand Down

0 comments on commit fc13648

Please sign in to comment.