File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ export function replaceWithRequireNodeAddon3(
6060 originalId : string
6161) {
6262 const { packageName, relativePath } = determineModuleContext ( resolvedPath ) ;
63- const finalRelPath = relativePath . startsWith ( "./" ) ? relativePath : `./${ relativePath } ` ;
63+ const dotRelativePath = relativePath . startsWith ( "./" ) ? relativePath : `./${ relativePath } ` ;
6464
6565 p . replaceWith (
6666 t . callExpression (
@@ -70,7 +70,7 @@ export function replaceWithRequireNodeAddon3(
7070 ] ) ,
7171 t . identifier ( "requireNodeAddon" )
7272 ) ,
73- [ finalRelPath , packageName , originalId ]
73+ [ dotRelativePath , packageName , originalId ]
7474 . map ( t . stringLiteral ) ,
7575 )
7676 ) ;
Original file line number Diff line number Diff line change @@ -134,9 +134,9 @@ export function determineModuleContext(
134134 packageNameCache . set ( pkgDir , pkgName ) ;
135135 }
136136 // Compute module-relative path
137- const relPath = path . relative ( pkgDir , originalPath )
137+ const relativePath = path . relative ( pkgDir , originalPath )
138138 . replaceAll ( "\\" , "/" ) ;
139- return { packageName : pkgName , relativePath : relPath } ;
139+ return { packageName : pkgName , relativePath } ;
140140}
141141
142142/**
You can’t perform that action at this time.
0 commit comments