Skip to content

Commit 41a7f7e

Browse files
committed
fix
1 parent f79290c commit 41a7f7e

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

crates/next-core/src/next_client/context.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,10 +241,10 @@ pub async fn get_client_module_options_context(
241241
webpack_loader_options(project_path, next_config, false, conditions).await?;
242242

243243
let tree_shaking_mode_for_user_code = *next_config
244-
.tree_shaking_mode_for_user_code(Vc::cell(next_mode.is_development()))
244+
.tree_shaking_mode_for_user_code(next_mode.is_development())
245245
.await?;
246246
let tree_shaking_mode_for_foreign_code = *next_config
247-
.tree_shaking_mode_for_foreign_code(Vc::cell(next_mode.is_development()))
247+
.tree_shaking_mode_for_foreign_code(next_mode.is_development())
248248
.await?;
249249
let use_swc_css = *next_config.use_swc_css().await?;
250250
let target_browsers = env.runtime_versions();

crates/next-core/src/next_config.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,14 +1125,11 @@ impl NextConfig {
11251125
self: Vc<Self>,
11261126
is_development: bool,
11271127
) -> Result<Vc<OptionTreeShaking>> {
1128-
let is_development = *is_development.await?;
11291128
let tree_shaking = self.await?.experimental.tree_shaking;
11301129

11311130
Ok(OptionTreeShaking(match tree_shaking {
11321131
Some(false) => Some(TreeShakingMode::ReexportsOnly),
1133-
Some(true) => {
1134-
Some(TreeShakingMode::ModuleFragments)
1135-
}
1132+
Some(true) => Some(TreeShakingMode::ModuleFragments),
11361133
None => {
11371134
if is_development {
11381135
Some(TreeShakingMode::ReexportsOnly)
@@ -1147,7 +1144,7 @@ impl NextConfig {
11471144
#[turbo_tasks::function]
11481145
pub async fn tree_shaking_mode_for_user_code(
11491146
self: Vc<Self>,
1150-
_is_development: Vc<bool>,
1147+
_is_development: bool,
11511148
) -> Result<Vc<OptionTreeShaking>> {
11521149
Ok(Vc::cell(Some(TreeShakingMode::ReexportsOnly)))
11531150
}

0 commit comments

Comments
 (0)