Skip to content

Commit

Permalink
Update module_imports.rs
Browse files Browse the repository at this point in the history
Co-authored-by: overlookmotel <[email protected]>
  • Loading branch information
Dunqing and overlookmotel authored Aug 5, 2024
1 parent 4eb60c6 commit e4e9ef2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/oxc_transformer/src/helpers/module_imports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,9 @@ impl<'a> ModuleImports<'a> {
ctx: &mut TraverseCtx<'a>,
) -> Statement<'a> {
let var_kind = VariableDeclarationKind::Var;
let symbol_id = ctx.scopes().get_root_binding("require");
let ident =
ctx.create_reference_id(SPAN, Atom::from("require"), None, ReferenceFlag::read());
ctx.create_reference_id(SPAN, Atom::from("require"), symbol_id, ReferenceFlag::read());
let callee = self.ast.expression_from_identifier_reference(ident);

let args = {
Expand Down

0 comments on commit e4e9ef2

Please sign in to comment.