Skip to content

Commit

Permalink
fix(core): ignore nested node_module paths for findProjectOfResolvedM…
Browse files Browse the repository at this point in the history
…odule in TargetProjectLocator (#17630)
  • Loading branch information
meeroslav authored Jun 18, 2023
1 parent d2bde06 commit 1fda800
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,12 @@ export class TargetProjectLocator {
private findProjectOfResolvedModule(
resolvedModule: string
): string | undefined {
if (resolvedModule.startsWith('node_modules/')) return undefined;
if (
resolvedModule.startsWith('node_modules/') ||
resolvedModule.includes('/node_modules/')
) {
return undefined;
}
const normalizedResolvedModule = resolvedModule.startsWith('./')
? resolvedModule.substring(2)
: resolvedModule;
Expand Down

1 comment on commit 1fda800

@vercel
Copy link

@vercel vercel bot commented on 1fda800 Jun 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-git-master-nrwl.vercel.app
nx.dev
nx-dev-nrwl.vercel.app
nx-five.vercel.app

Please sign in to comment.