Skip to content

Commit 9d87d4d

Browse files
authoredMar 17, 2025··
fix(es/minifier): Allow TypeScript nodes to fix styled-jsx (#10221)
**Description:** `styled-jsx` passes typescript input to the `Evaluator`.
1 parent fc88960 commit 9d87d4d

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed
 

‎.changeset/smart-flies-sort.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
swc_core: patch
3+
swc_ecma_minifier: patch
4+
---
5+
6+
fix(es/minifier): Allow TypeScript nodes to fix `styled-jsx`

‎crates/swc_ecma_minifier/src/compress/pure/vars.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ pub(super) struct VarWithOutInitCounter {
300300
}
301301

302302
impl Visit for VarWithOutInitCounter {
303-
noop_visit_type!(fail);
303+
noop_visit_type!();
304304

305305
fn visit_arrow_expr(&mut self, _: &ArrowExpr) {}
306306

@@ -368,7 +368,7 @@ pub(super) struct VarMover {
368368
}
369369

370370
impl VisitMut for VarMover {
371-
noop_visit_mut_type!(fail);
371+
noop_visit_mut_type!();
372372

373373
/// Noop
374374
fn visit_mut_arrow_expr(&mut self, _: &mut ArrowExpr) {}
@@ -492,7 +492,7 @@ pub(super) struct VarPrepender {
492492
}
493493

494494
impl VisitMut for VarPrepender {
495-
noop_visit_mut_type!(fail);
495+
noop_visit_mut_type!();
496496

497497
/// Noop
498498
fn visit_mut_arrow_expr(&mut self, _: &mut ArrowExpr) {}

0 commit comments

Comments
 (0)
Please sign in to comment.