summaryrefslogtreecommitdiff
path: root/cli/ast.rs
diff options
context:
space:
mode:
authorJános Veres <janos.veres@gmail.com>2020-12-02 20:26:04 +0100
committerGitHub <noreply@github.com>2020-12-02 20:26:04 +0100
commit93d9f51d16711e6ec0763e1189eb1a57a5ba8e3e (patch)
tree3bc8324a7122567de62c2f291a5996436cb21eeb /cli/ast.rs
parent95ccc1a52f891841cfdfbb87229cef17139be399 (diff)
fix(cli): add hygiene pass to transpile pipeline (#8586)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/ast.rs')
-rw-r--r--cli/ast.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/cli/ast.rs b/cli/ast.rs
index ab32e4301..10d7b5383 100644
--- a/cli/ast.rs
+++ b/cli/ast.rs
@@ -42,6 +42,7 @@ use swc_ecmascript::parser::Syntax;
use swc_ecmascript::parser::TsConfig;
use swc_ecmascript::transforms::fixer;
use swc_ecmascript::transforms::helpers;
+use swc_ecmascript::transforms::hygiene;
use swc_ecmascript::transforms::pass::Optional;
use swc_ecmascript::transforms::proposals;
use swc_ecmascript::transforms::react;
@@ -305,6 +306,7 @@ impl ParsedModule {
helpers::inject_helpers(),
typescript::strip(),
fixer(Some(&self.comments)),
+ hygiene(),
);
let program = swc_common::GLOBALS.set(&Globals::new(), || {