From e09b357553a92361ad11cbbfc2717c0850253198 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Sat, 30 Nov 2024 03:15:54 +0900 Subject: [PATCH] fix --- turbopack/crates/turbopack-css/src/process.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/turbopack/crates/turbopack-css/src/process.rs b/turbopack/crates/turbopack-css/src/process.rs index d3f5be02d68dc..f967149243ee8 100644 --- a/turbopack/crates/turbopack-css/src/process.rs +++ b/turbopack/crates/turbopack-css/src/process.rs @@ -19,7 +19,7 @@ use swc_core::{ }; use tracing::Instrument; use turbo_rcstr::RcStr; -use turbo_tasks::{FxIndexMap, ResolvedVc, ValueToString, Vc}; +use turbo_tasks::{FxIndexMap, ResolvedVc, TryJoinIterExt, ValueToString, Vc}; use turbo_tasks_fs::{FileContent, FileSystemPath}; use turbopack_core::{ asset::{Asset, AssetContent}, @@ -247,7 +247,7 @@ pub async fn finalize_css( let mut url_map = HashMap::new(); for (src, reference) in (*url_references.await?).iter() { - let resolved = resolve_url_reference(*reference, chunking_context).await?; + let resolved = resolve_url_reference(**reference, chunking_context).await?; if let Some(v) = resolved.as_ref().cloned() { url_map.insert(RcStr::from(src.as_str()), v); } @@ -474,6 +474,12 @@ async fn process_content( let (references, url_references) = analyze_references(&mut stylesheet, source, origin, import_context)?; + let url_references = url_references + .into_iter() + .map(|(k, v)| async move { Ok((k, v.to_resolved().await?)) }) + .try_join() + .await?; + Ok(ParseCssResult::Ok { code: content_vc.to_resolved().await?, stylesheet,