next.js
b0c41813 - perf(turbopack): Remove needless clone of sourcemap (#78972)

Commit
1 year ago
perf(turbopack): Remove needless clone of sourcemap (#78972) ### What? Use `sourcemap::SourceMap::adjust_mapping` directly instead of relying on `swc_common`. ### Why? https://github.com/swc-project/swc/blob/6750459d9180048a39c11e14b02c9bfed251a12e/crates/swc_common/src/source_map.rs#L1385-L1388 ```rust if let Some(mut orig) = orig.cloned() { orig.adjust_mappings(&map); return orig; } ``` If we pass `orig,` the original source map is cloned. I'll fix this API issue from the SWC side in the future. x-ref, numbers: https://vercel.slack.com/archives/C03EWR7LGEN/p1746729015204369?thread_ts=1746727709.014039&cid=C03EWR7LGEN
Author
Parents
Loading