From 3e4ac54fc3ac95a3c566fff5b2d80ea8c046a26a Mon Sep 17 00:00:00 2001 From: Hai Date: Tue, 22 Sep 2026 15:56:54 +0800 Subject: [PATCH] perf: skip source map composition for a single minimizer --- src/minify.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/minify.js b/src/minify.js index 425c0299..1d792cc7 100644 --- a/src/minify.js +++ b/src/minify.js @@ -545,7 +545,9 @@ async function minify(options) { // the final map points back to the original sources. Bytes carry none. lastMap = Buffer.isBuffer(result.code) ? undefined - : composeSourceMaps(result.map, currentMap, name); + : implementations.length === 1 + ? result.map + : composeSourceMaps(result.map, currentMap, name); } }