Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mischnic committed May 28, 2022
1 parent 4285464 commit 3e6f117
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
4 changes: 0 additions & 4 deletions packages/transformers/js/core/src/hoist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -914,10 +914,6 @@ impl<'a> Fold for Hoist<'a> {
}

fn fold_prop(&mut self, node: Prop) -> Prop {
if self.collect.should_wrap {
return node.fold_children_with(self);
}

match node {
Prop::Shorthand(ident) => Prop::KeyValue(KeyValueProp {
key: PropName::Ident(Ident::new(ident.sym.clone(), DUMMY_SP)),
Expand Down
5 changes: 2 additions & 3 deletions packages/transformers/js/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@ use std::str::FromStr;

use path_slash::PathExt;
use serde::{Deserialize, Serialize};
use swc_atoms::JsWord;
use swc_common::comments::SingleThreadedComments;
use swc_common::errors::{DiagnosticBuilder, Emitter, Handler};
use swc_common::{chain, sync::Lrc, FileName, Globals, Mark, SourceMap};
use swc_ecmascript::ast::{Ident, Module};
use swc_ecmascript::ast::Module;
use swc_ecmascript::codegen::text_writer::JsWriter;
use swc_ecmascript::parser::lexer::Lexer;
use swc_ecmascript::parser::{EsConfig, PResult, Parser, StringInput, Syntax, TsConfig};
Expand All @@ -44,7 +43,7 @@ use swc_ecmascript::transforms::{
optimization::simplify::dead_branch_remover, optimization::simplify::expr_simplifier,
pass::Optional, proposals::decorators, react, typescript,
};
use swc_ecmascript::visit::{Fold, FoldWith, VisitWith};
use swc_ecmascript::visit::{FoldWith, VisitWith};

use decl_collector::*;
use dependency_collector::*;
Expand Down

0 comments on commit 3e6f117

Please sign in to comment.