File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -60,8 +60,7 @@ export function replaceWithRequireNodeAddon3(
6060 originalId : string
6161) {
6262 const { packageName, relativePath } = determineModuleContext ( resolvedPath ) ;
63- const relPath = relativePath . replaceAll ( "\\" , "/" ) ;
64- const finalRelPath = relPath . startsWith ( "./" ) ? relPath : `./${ relPath } ` ;
63+ const finalRelPath = relativePath . startsWith ( "./" ) ? relativePath : `./${ relativePath } ` ;
6564
6665 p . replaceWith (
6766 t . callExpression (
Original file line number Diff line number Diff line change @@ -134,7 +134,8 @@ export function determineModuleContext(
134134 packageNameCache . set ( pkgDir , pkgName ) ;
135135 }
136136 // Compute module-relative path
137- const relPath = path . relative ( pkgDir , originalPath ) ;
137+ const relPath = path . relative ( pkgDir , originalPath )
138+ . replaceAll ( "\\" , "/" ) ;
138139 return { packageName : pkgName , relativePath : relPath } ;
139140}
140141
You can’t perform that action at this time.
0 commit comments