Skip to content

Commit

Permalink
Merge pull request #4 from facebook/next
Browse files Browse the repository at this point in the history
Ensure workspaces key exists in parent package.json (facebook#3989)
  • Loading branch information
tvalentius authored Feb 7, 2018
2 parents fdb0e77 + 47d2d94 commit fc3e5f5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/react-scripts/config/paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ const getMonorepoPkgPaths = () => {
if (monoPkgPath) {
// get monorepo config from yarn workspace
const pkgPatterns = require(monoPkgPath).workspaces;
if (pkgPatterns == null) {
return [];
}
const pkgPaths = findPkgs(path.dirname(monoPkgPath), pkgPatterns);
// only include monorepo pkgs if app itself is included in monorepo
if (pkgPaths.indexOf(appDirectory) !== -1) {
Expand Down

0 comments on commit fc3e5f5

Please sign in to comment.