Skip to content

Commit

Permalink
Fix turbopack-core
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed May 28, 2024
1 parent e88150a commit c99e4c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions crates/turbopack-core/src/resolve/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2328,7 +2328,7 @@ async fn resolve_into_package(

if could_match_others {
let mut new_pat = path.clone();
new_pat.push_front(".".to_string().into());
new_pat.push_front(RcStr::from(".").into());

let relative = Request::relative(Value::new(new_pat), query, fragment, true);
results
Expand Down Expand Up @@ -2501,7 +2501,8 @@ async fn handle_exports_imports_field(
let mut resolved_results = Vec::new();
for (result_path, conditions) in results {
if let Some(result_path) = normalize_path(result_path) {
let request = Request::parse(Value::new(format!("./{}", result_path).into()));
let request =
Request::parse(Value::new(RcStr::from(format!("./{}", result_path)).into()));
let resolve_result = resolve_internal_boxed(package_path, request, options).await?;
if conditions.is_empty() {
resolved_results.push(resolve_result.with_request(path.into()));
Expand Down
2 changes: 1 addition & 1 deletion crates/turbopack-core/src/resolve/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ async fn import_mapping_to_result(
ImportMapResult::Result(ResolveResult::primary(ResolveResultItem::Empty).into())
}
ImportMapping::PrimaryAlternative(name, context) => {
let request = Request::parse(Value::new(name.to_string().into()));
let request = Request::parse(Value::new(name.clone().into()));

ImportMapResult::Alias(request, *context)
}
Expand Down

0 comments on commit c99e4c1

Please sign in to comment.