Skip to content

Commit

Permalink
Add support for new yarn workspaces config format
Browse files Browse the repository at this point in the history
  • Loading branch information
detrohutt committed Feb 10, 2018
1 parent 2c34d5b commit 5e0902e
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 5e0902e

Please sign in to comment.