diff --git a/status/build.js b/status/build.js index 0512377..352a9da 100644 --- a/status/build.js +++ b/status/build.js @@ -149,13 +149,18 @@ async function build() { const concatenated = parts.join(';\n'); // Minify with esbuild (safe to re-minify already-minified code like driver.min.js) - const { code } = await esbuild.transform(concatenated, { + // DC-072: sourcemap='both' emits inline + external .map for production debugging + const { code, map } = await esbuild.transform(concatenated, { minify: true, target: 'es2020', + sourcemap: 'both', }); const outPath = path.join(DIST, outName); fs.writeFileSync(outPath, code); + if (map) { + fs.writeFileSync(outPath + '.map', map); + } const rawSize = (Buffer.byteLength(concatenated) / 1024).toFixed(1); const minSize = (Buffer.byteLength(code) / 1024).toFixed(1);