From cc7b68c2ec369a8a40d5de8ce3472f2be369dce2 Mon Sep 17 00:00:00 2001 From: atanasster Date: Tue, 20 Apr 2021 00:16:07 -0400 Subject: [PATCH] fix: change path.resolve to require-resolve --- core/instrument/src/babel/extract-component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/instrument/src/babel/extract-component.ts b/core/instrument/src/babel/extract-component.ts index f3d4bcaac..4f121fa1a 100644 --- a/core/instrument/src/babel/extract-component.ts +++ b/core/instrument/src/babel/extract-component.ts @@ -184,7 +184,7 @@ const componentRelatedMetrics = async ( const dependents = component.localDependencies ? Object.keys(component.localDependencies) .filter(f => f.startsWith(`.${path.sep}`)) - .map(f => path.resolve(componetFolder, f)) + .map(f => require.resolve(f, { paths: [componetFolder] })) : []; const testResults = await extractTests( [component.request, ...dependents],