File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
packages/react-native-node-api-modules/src/node/babel-plugin Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -76,8 +76,7 @@ function findNodeAddonForBindings(id: string, fromDir: string) {
7676export function replaceWithRequireNodeAddon3 (
7777 p : NodePath ,
7878 resolvedPath : string ,
79- originalPath : string ,
80- requiredFrom : string
79+ originalPath : string
8180) {
8281 const { packageName, relativePath } = determineModuleContext ( resolvedPath ) ;
8382 const finalRelPath = relativePath . startsWith ( "./" )
@@ -124,14 +123,14 @@ export function plugin(): PluginObj {
124123 const id = argument . value ;
125124 const resolvedPath = findNodeAddonForBindings ( id , from ) ;
126125 if ( resolvedPath !== undefined ) {
127- replaceWithRequireNodeAddon3 ( p . parentPath , resolvedPath , id , this . filename ) ;
126+ replaceWithRequireNodeAddon3 ( p . parentPath , resolvedPath , id ) ;
128127 }
129128 }
130129 } else {
131130 // This should handle "bare specifiers" and "private imports" that start with `#`
132131 const resolvedPath = tryResolveModulePath ( id , from ) ;
133132 if ( ! ! resolvedPath && isNodeApiModule ( resolvedPath ) ) {
134- replaceWithRequireNodeAddon3 ( p , resolvedPath , id , this . filename ) ;
133+ replaceWithRequireNodeAddon3 ( p , resolvedPath , id ) ;
135134 }
136135 }
137136 }
You can’t perform that action at this time.
0 commit comments