Skip to content

Commit

Permalink
refactor: 🎨 no need to resolve empty url in css
Browse files Browse the repository at this point in the history
  • Loading branch information
stormslowly committed Dec 23, 2024
1 parent 5fd4f76 commit 4c42ffc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion crates/mako/src/resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions crates/mako/src/visitors/css_assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4c42ffc

Please sign in to comment.