Skip to content

Commit

Permalink
Fix handling of circular requires
Browse files Browse the repository at this point in the history
Fixes #24
  • Loading branch information
sindresorhus committed Feb 5, 2022
1 parent bbc234b commit 4808002
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ function getMainProcessPaths(topModuleObject, cwd) {

const getPaths = moduleObject => {
for (const child of moduleObject.children) {
if (paths.has(child.filename)) {
continue;
}

if (path.relative(cwd, child.filename).includes('node_modules')) {
continue;
}
Expand Down

0 comments on commit 4808002

Please sign in to comment.