Skip to content

Commit

Permalink
perf(turbopack): Update SWC plugins (styled-jsx, emotion) (#75236)
Browse files Browse the repository at this point in the history
### What?

Apply swc-project/plugins#391

### Why?

Those passes allocates too much even when they are not used.
  • Loading branch information
kdy1 authored Jan 23, 2025
1 parent f641c39 commit 525b968
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
19 changes: 11 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ miette = { version = "5.10.0", features = ["fancy"] }
mdxjs = "0.2.15"
modularize_imports = { version = "0.70.1" }
styled_components = { version = "0.98.1" }
styled_jsx = { version = "0.75.1" }
swc_emotion = { version = "0.74.1" }
styled_jsx = { version = "0.75.2" }
swc_emotion = { version = "0.74.2" }
swc_relay = { version = "0.46.1" }

# General Deps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ impl EmotionTransformer {
// emotion transform.
enabled: Some(true),
sourcemap: config.sourcemap,
label_format: config.label_format.clone(),
label_format: config.label_format.as_deref().map(From::from),
auto_label: if let Some(auto_label) = config.auto_label.as_ref() {
match auto_label {
EmotionLabelKind::Always => Some(true),
Expand Down

0 comments on commit 525b968

Please sign in to comment.