Skip to content

Commit 564a818

Browse files
committed
chore: update code
1 parent 0fa3f7e commit 564a818

2 files changed

Lines changed: 10 additions & 9 deletions

File tree

crates/pack-core/src/client/context.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,10 +278,9 @@ pub async fn get_client_module_options_context(
278278
} else {
279279
false
280280
};
281-
let jsx_transform_options =
282-
get_jsx_transform_options(mode, false, config, enable_react_refresh)
283-
.to_resolved()
284-
.await?;
281+
let jsx_transform_options = get_jsx_transform_options(mode, config, enable_react_refresh)
282+
.to_resolved()
283+
.await?;
285284

286285
let mut loader_conditions = BTreeSet::new();
287286
loader_conditions.insert(WebpackLoaderBuiltinCondition::Browser);

crates/pack-core/src/transform_options.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ pub async fn get_decorators_transform_options(
115115
#[turbo_tasks::function]
116116
pub async fn get_jsx_transform_options(
117117
mode: Vc<Mode>,
118-
is_rsc_context: bool,
119118
config: Vc<Config>,
120119
enable_react_refresh: bool,
121120
) -> Result<Vc<JsxTransformOptions>> {
@@ -124,13 +123,14 @@ pub async fn get_jsx_transform_options(
124123

125124
let react_transform_options = JsxTransformOptions {
126125
development: mode.await?.is_react_development(),
127-
import_source: react_config.import_source.clone().or(
128-
if is_emotion_enabled && !is_rsc_context {
126+
import_source: react_config
127+
.import_source
128+
.clone()
129+
.or(if is_emotion_enabled {
129130
Some("@emotion/react".into())
130131
} else {
131132
Some("react".into())
132-
},
133-
),
133+
}),
134134
runtime: react_config
135135
.runtime
136136
.as_ref()
@@ -139,5 +139,7 @@ pub async fn get_jsx_transform_options(
139139
react_refresh: enable_react_refresh,
140140
};
141141

142+
dbg!(&react_transform_options);
143+
142144
Ok(react_transform_options.cell())
143145
}

0 commit comments

Comments
 (0)