Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Mar 6, 2024
1 parent 4805535 commit fe57ec4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ pub async fn get_client_module_options_context(
.cell()
});

let use_swc_css = *next_config.use_swc_css_for_turbopack().await?;
let use_swc_css = *next_config.use_swc_css().await?;
let target_browsers = env.runtime_versions();

let mut next_client_rules =
Expand Down
2 changes: 1 addition & 1 deletion packages/next-swc/crates/next-core/src/next_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ impl NextConfig {
}

#[turbo_tasks::function]
pub async fn use_swc_css_for_turbopack(self: Vc<Self>) -> Result<Vc<bool>> {
pub async fn use_swc_css(self: Vc<Self>) -> Result<Vc<bool>> {
Ok(Vc::cell(
self.await?
.experimental
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ pub async fn get_server_module_options_context(
.cell()
});

let use_swc_css = *next_config.use_swc_css_for_turbopack().await?;
let use_swc_css = *next_config.use_swc_css().await?;
let versions = RuntimeVersions(Default::default()).cell();

// ModuleOptionsContext related options
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ pub async fn get_styled_jsx_transform_rule(
target_browsers: Vc<RuntimeVersions>,
) -> Result<Option<ModuleRule>> {
let enable_mdx_rs = *next_config.mdx_rs().await?;
let use_swc_css_for_turbopack = *next_config.use_swc_css_for_turbopack().await?;
let use_swc_css = *next_config.use_swc_css().await?;
let versions = *target_browsers.await?;

let transformer = StyledJsxTransformer::new(!use_swc_css_for_turbopack, versions);
let transformer = StyledJsxTransformer::new(!use_swc_css, versions);
Ok(Some(get_ecma_transform_rule(
Box::new(transformer),
enable_mdx_rs,
Expand Down

0 comments on commit fe57ec4

Please sign in to comment.