Skip to content

Commit

Permalink
improve efficiency a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
thejackshelton committed Aug 5, 2024
1 parent 0f5fd30 commit 194b9a2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion libs/qwikdev-astro/src/entrypoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@ function findQwikLibraryEntrypoints(nodeModulesPath: string): string[] {
}
}

searchDirectory(nodeModulesPath);
// Start the search from each immediate subdirectory of node_modules
const packages = fs.readdirSync(nodeModulesPath);
for (const pkg of packages) {
const pkgPath = path.join(nodeModulesPath, pkg);
if (fs.statSync(pkgPath).isDirectory()) {
searchDirectory(pkgPath);
}
}

return entrypoints;
}

0 comments on commit 194b9a2

Please sign in to comment.