Skip to content

Commit 3e4ac54

Browse files
committed
perf: skip source map composition for a single minimizer
1 parent c8c4bf2 commit 3e4ac54

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎src/minify.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,9 @@ async function minify(options) {
545545
// the final map points back to the original sources. Bytes carry none.
546546
lastMap = Buffer.isBuffer(result.code)
547547
? undefined
548-
: composeSourceMaps(result.map, currentMap, name);
548+
: implementations.length === 1
549+
? result.map
550+
: composeSourceMaps(result.map, currentMap, name);
549551
}
550552
}
551553

0 commit comments

Comments
 (0)