Skip to content

Commit

Permalink
fix swc-plugin pre-transform
Browse files Browse the repository at this point in the history
  • Loading branch information
taishinaritomi committed Feb 25, 2023
1 parent 127897b commit 1f625b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/swc-plugin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ members = [

[profile.release]
# https://swc.rs/docs/plugin/publishing#adjusting-configuration-for-smaller-binary
codegen-units = 1
# codegen-units = 1
lto = true
opt-level = "s"
strip = "symbols"
# opt-level = "s"
# strip = "symbols"
3 changes: 2 additions & 1 deletion packages/swc-plugin/crates/pre-transform/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ impl TransformVisitor {
spread: None,
expr: Box::new(self.build_arg.clone()),
});
let target_index: f64 = self.target_index.into();
let target_index: f64 = self.target_index.clone().into();
// let target_index: f64 = self.target_index as f64;
call_expr.args.push(ExprOrSpread {
expr: Box::new(Expr::Lit(Lit::Num(Number::from(target_index)))),
spread: None,
Expand Down

0 comments on commit 1f625b2

Please sign in to comment.