Skip to content

Commit c7f8cb6

Browse files
committed
Revert "Avoid invalidating client chunking context when chunk_suffix_path changes"
This reverts commit 43f5bdd.
1 parent df6faf4 commit c7f8cb6

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ pub async fn get_client_chunking_context(
447447

448448
let next_mode = mode.await?;
449449
let asset_prefix = asset_prefix.owned().await?;
450-
let chunk_suffix_path = chunk_suffix_path.to_resolved().await?;
450+
let chunk_suffix_path = chunk_suffix_path.owned().await?;
451451
let mut builder = BrowserChunkingContext::builder(
452452
root_path,
453453
client_root.clone(),

turbopack/crates/turbopack-browser/src/chunking_context.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ impl BrowserChunkingContextBuilder {
125125
self
126126
}
127127

128-
pub fn chunk_suffix_path(mut self, chunk_suffix_path: ResolvedVc<Option<RcStr>>) -> Self {
129-
self.chunking_context.chunk_suffix_path = Some(chunk_suffix_path);
128+
pub fn chunk_suffix_path(mut self, chunk_suffix_path: Option<RcStr>) -> Self {
129+
self.chunking_context.chunk_suffix_path = chunk_suffix_path;
130130
self
131131
}
132132

@@ -222,7 +222,7 @@ pub struct BrowserChunkingContext {
222222
chunk_base_path: Option<RcStr>,
223223
/// Suffix path that will be appended to all chunk URLs when loading them.
224224
/// This path will not appear in chunk paths or chunk data.
225-
chunk_suffix_path: Option<ResolvedVc<Option<RcStr>>>,
225+
chunk_suffix_path: Option<RcStr>,
226226
/// URL prefix that will be prepended to all static asset URLs when loading
227227
/// them.
228228
asset_base_path: Option<RcStr>,
@@ -381,11 +381,7 @@ impl BrowserChunkingContext {
381381
/// Returns the asset suffix path.
382382
#[turbo_tasks::function]
383383
pub fn chunk_suffix_path(&self) -> Vc<Option<RcStr>> {
384-
if let Some(chunk_suffix_path) = self.chunk_suffix_path {
385-
*chunk_suffix_path
386-
} else {
387-
Vc::cell(None)
388-
}
384+
Vc::cell(self.chunk_suffix_path.clone())
389385
}
390386

391387
/// Returns the source map type.

0 commit comments

Comments
 (0)