next.js
7ddd5ef0 - perf(turbopack): Do not inline synthesized content for sourcemaps (#79173)

Commit
268 days ago
perf(turbopack): Do not inline synthesized content for sourcemaps (#79173) ### What? Disable `inline_sources_content` of SWC source map generator for `minify()`. ### Why? Regardless, it's the wrong value from the user's perspective, so we cannot use it anyway. build_sourcemap will fill the sourcemap with the content provided by the value passed to cm.new_source_file at https://github.com/vercel/next.js/blob/bcd799fc688fc3b1535150e24c6057033e29bf3c/turbopack/crates/turbopack-ecmascript/src/minify.rs#L41-L44 but for minify(), it's not the input string (written by the user) but it's a codegen-ed string. Also, `sourcemap::SourceMap::adjust_mappings` says > /// This function assumes that `adjustment` contains no relevant information except for mappings. > /// All information about sources and names is copied from `self`. so we do not need inline source contents regardless if we are going to call it.
Author
Parents
Loading