We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e43606a commit 182cd54Copy full SHA for 182cd54
turbopack/crates/turbopack-nodejs/src/chunking_context.rs
@@ -287,11 +287,14 @@ impl ChunkingContext for NodeJsChunkingContext {
287
extension: RcStr,
288
) -> Result<Vc<FileSystemPath>> {
289
let root_path = *self.chunk_root_path;
290
- let name = ident
291
- .output_name(*self.root_path, extension)
292
- .owned()
293
- .await?;
294
- Ok(root_path.join(name))
+ let mut name = ident
+ .output_name(*self.root_path, extension.clone())
+ .await?
+ .to_string();
+ if !name.ends_with(extension.as_str()) {
295
+ name.push_str(&extension);
296
+ }
297
+ Ok(root_path.join(name.into()))
298
}
299
300
#[turbo_tasks::function]
0 commit comments