From 88be4a837d1695c62a7009a5c73b08b0c4fae466 Mon Sep 17 00:00:00 2001 From: sapphi-red <49056869+sapphi-red@users.noreply.github.com> Date: Fri, 22 Nov 2024 20:36:45 +0900 Subject: [PATCH] rolldown optimize --- packages/vite/src/node/optimizer/index.ts | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/packages/vite/src/node/optimizer/index.ts b/packages/vite/src/node/optimizer/index.ts index 0c49e1468e01eb..f6f498263ae142 100644 --- a/packages/vite/src/node/optimizer/index.ts +++ b/packages/vite/src/node/optimizer/index.ts @@ -668,25 +668,6 @@ export function runOptimizeDeps( isDynamicEntry: chunk.isDynamicEntry, }) } - } else { - // workaround Firefox warning by removing blank source map reference - // https://github.com/evanw/esbuild/issues/3945 - const output = meta.outputs[o] - // filter by exact bytes of an empty source map - if (output.bytes === 93) { - const jsMapPath = path.resolve(o) - const jsPath = jsMapPath.slice(0, -4) - if (fs.existsSync(jsPath) && fs.existsSync(jsMapPath)) { - const map = JSON.parse(fs.readFileSync(jsMapPath, 'utf-8')) - if (map.sources.length === 0) { - const js = fs.readFileSync(jsPath, 'utf-8') - fs.writeFileSync( - jsPath, - js.slice(0, js.lastIndexOf('//# sourceMappingURL=')), - ) - } - } - } } }