Skip to content

Commit 7bedbb6

Browse files
committed
fix: compile err
1 parent 39fe3b1 commit 7bedbb6

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

turbopack/crates/turbopack-css/src/chunk/mod.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ pub mod source_map;
44
use std::fmt::Write;
55

66
use anyhow::{Result, bail};
7+
use swc_core::common::pass::Either;
78
use turbo_rcstr::{RcStr, rcstr};
8-
use turbo_tasks::{FxIndexSet, ResolvedVc, TryJoinIterExt, ValueDefault, ValueToString, Vc};
9+
use turbo_tasks::{
10+
FxIndexSet, ResolvedVc, TryFlatJoinIterExt, TryJoinIterExt, ValueDefault, ValueToString, Vc,
11+
};
912
use turbo_tasks_fs::{
1013
File, FileSystem, FileSystemPath,
1114
rope::{Rope, RopeBuilder},
@@ -32,7 +35,7 @@ use turbopack_core::{
3235
source_map::{GenerateSourceMap, OptionStringifiedSourceMap, utils::fileify_source_map},
3336
};
3437

35-
use self::source_map::CssChunkSourceMapAsset;
38+
use self::{single_item_chunk::chunk::SingleItemCssChunk, source_map::CssChunkSourceMapAsset};
3639
use crate::{ImportAssetReference, util::stringify_js};
3740

3841
#[turbo_tasks::value]
@@ -313,7 +316,7 @@ impl OutputChunk for CssChunk {
313316
};
314317
Ok(OutputChunkRuntimeInfo {
315318
included_ids: Some(ResolvedVc::cell(included_ids)),
316-
module_chunks: None,
319+
module_chunks: Some(ResolvedVc::cell(module_chunks)),
317320
..Default::default()
318321
}
319322
.cell())

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -321,10 +321,10 @@ impl ChunkingContext for NodeJsChunkingContext {
321321
extension: RcStr,
322322
) -> Result<Vc<FileSystemPath>> {
323323
let root_path = self.chunk_root_path.clone();
324-
let name = ident
325-
.output_name(self.root_path.clone(), prefix, extension)
326-
.owned()
327-
.await?;
324+
let mut name = ident
325+
.output_name(self.root_path.clone(), prefix, extension.clone())
326+
.await?
327+
.to_string();
328328
if !name.ends_with(extension.as_str()) {
329329
name.push_str(&extension);
330330
}

turbopack/crates/turbopack/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,9 @@ pub async fn externals_tracing_module_context(
683683
custom_conditions: match ty {
684684
ExternalType::CommonJs => vec![rcstr!("require"), rcstr!("node")],
685685
ExternalType::EcmaScriptModule => vec![rcstr!("import"), rcstr!("node")],
686-
ExternalType::Url | ExternalType::Global | ExternalType::Script | ExternalType::Umd => vec![rcstr!("node")],
686+
ExternalType::Url | ExternalType::Global | ExternalType::Script | ExternalType::Umd => {
687+
vec![rcstr!("node")]
688+
}
687689
},
688690
..Default::default()
689691
};

0 commit comments

Comments
 (0)