@@ -163,7 +163,7 @@ export function renameDynamicImport(fileAst : t.File) : void {
163
163
CallExpression ( path : NodePath < t . CallExpression > ) {
164
164
165
165
if ( t . isImport ( path . node . callee ) )
166
- path . replaceWith ( t . callExpression ( t . identifier ( 'import_ ' ) , path . node . arguments ) )
166
+ path . replaceWith ( t . callExpression ( t . identifier ( 'import__ ' ) , path . node . arguments ) )
167
167
}
168
168
} ) ;
169
169
}
@@ -310,7 +310,7 @@ export function createModule(refPath : string, source : string, options : Option
310
310
throw new Error ( `${ id } not found in moduleCache` ) ;
311
311
}
312
312
313
- const import_ = async function ( relPath : string ) {
313
+ const importFunction = async function ( relPath : string ) {
314
314
315
315
return await loadModuleInternal ( { refPath, relPath } , options ) ;
316
316
}
@@ -321,7 +321,7 @@ export function createModule(refPath : string, source : string, options : Option
321
321
322
322
// see https://github.com/nodejs/node/blob/a46b21f556a83e43965897088778ddc7d46019ae/lib/internal/modules/cjs/loader.js#L195-L198
323
323
// see https://github.com/nodejs/node/blob/a46b21f556a83e43965897088778ddc7d46019ae/lib/internal/modules/cjs/loader.js#L1102
324
- Function ( 'exports' , 'require' , 'module' , '__filename' , '__dirname' , 'import_ ' , source ) . call ( module . exports , module . exports , require , module , refPath , resolve ( { refPath, relPath : '.' } ) , import_ ) ;
324
+ Function ( 'exports' , 'require' , 'module' , '__filename' , '__dirname' , 'import__ ' , source ) . call ( module . exports , module . exports , require , module , refPath , resolve ( { refPath, relPath : '.' } ) , importFunction ) ;
325
325
326
326
return module ;
327
327
}
0 commit comments