Turbopack: Decode module component when tracing stack frames (#63070)
In addition to the file path, also url-decode the module name (represented by the `id` query parameter). Test Plan: Together with vercel/turbo#7682, this fixes `pnpm testonly-dev test/development/basic/hmr.test.ts "should recover from errors in the render function"` Closes PACK-2700
This commit is contained in:
parent
a2457c979b
commit
274c4b71db
1 changed files with 7 additions and 1 deletions
|
@ -845,7 +845,13 @@ pub async fn project_trace_source(
|
|||
"file" => {
|
||||
let path = urlencoding::decode(url.path())?.to_string();
|
||||
let module = url.query_pairs().find(|(k, _)| k == "id");
|
||||
(path, module.map(|(_, m)| m.into_owned()))
|
||||
(
|
||||
path,
|
||||
match module {
|
||||
Some(module) => Some(urlencoding::decode(&module.1)?.into_owned()),
|
||||
None => None,
|
||||
},
|
||||
)
|
||||
}
|
||||
_ => bail!("Unknown url scheme"),
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue