diff --git a/crates/mako/src/resolve.rs b/crates/mako/src/resolve.rs index f283eba13..71ece577c 100644 --- a/crates/mako/src/resolve.rs +++ b/crates/mako/src/resolve.rs @@ -280,7 +280,7 @@ fn do_resolve( } _ => { eprintln!( - "failed to resolve {} from {} with resolver err: {:?}", + "failed to resolve `{}` from `{}` with resolver err: {:?}", source, path.to_string_lossy(), oxc_resolve_err diff --git a/crates/mako/src/visitors/css_assets.rs b/crates/mako/src/visitors/css_assets.rs index 2a8b7155a..c5523ea0c 100644 --- a/crates/mako/src/visitors/css_assets.rs +++ b/crates/mako/src/visitors/css_assets.rs @@ -32,6 +32,10 @@ impl VisitMut for CSSAssets { return; } let url = remove_first_tilde(url); + + if url.is_empty() { + return; + } let dep = Dependency { source: url, resolve_as: None,