From d1a6cad513c1d9882748f9041c4a563bc7498c28 Mon Sep 17 00:00:00 2001 From: inottn Date: Tue, 20 Aug 2024 01:50:13 +0800 Subject: [PATCH] fix: remove the unnecessary logic for inserting semicolons --- .../rspack_plugin_javascript/src/visitors/semicolon.rs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/crates/rspack_plugin_javascript/src/visitors/semicolon.rs b/crates/rspack_plugin_javascript/src/visitors/semicolon.rs index e9ca5a73f4f..5f45d63b196 100644 --- a/crates/rspack_plugin_javascript/src/visitors/semicolon.rs +++ b/crates/rspack_plugin_javascript/src/visitors/semicolon.rs @@ -124,21 +124,11 @@ impl<'a> Visit for InsertedSemicolons<'a> { n.visit_children_with(self) } - fn visit_export_decl(&mut self, n: &swc_core::ecma::ast::ExportDecl) { - self.post_semi(&n.span); - n.visit_children_with(self) - } - fn visit_named_export(&mut self, n: &swc_core::ecma::ast::NamedExport) { self.post_semi(&n.span); n.visit_children_with(self) } - fn visit_export_default_decl(&mut self, n: &swc_core::ecma::ast::ExportDefaultDecl) { - self.post_semi(&n.span); - n.visit_children_with(self) - } - fn visit_export_default_expr(&mut self, n: &swc_core::ecma::ast::ExportDefaultExpr) { self.post_semi(&n.span); n.visit_children_with(self)