summaryrefslogtreecommitdiff
path: root/cli/ast.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/ast.rs')
-rw-r--r--cli/ast.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/cli/ast.rs b/cli/ast.rs
index 44e5616e7..bc7265c15 100644
--- a/cli/ast.rs
+++ b/cli/ast.rs
@@ -467,7 +467,11 @@ pub fn transpile_module(
typescript::strip(),
fixer(Some(&comments)),
);
- let module = module.fold_with(&mut passes);
+ let module = swc_common::GLOBALS.set(&Globals::new(), || {
+ helpers::HELPERS.set(&helpers::Helpers::new(false), || {
+ module.fold_with(&mut passes)
+ })
+ });
Ok((source_file, module))
}