Skip to content

Commit 88be4a8

Browse files
committed
rolldown optimize
1 parent 44d6ee1 commit 88be4a8

File tree

1 file changed

+0
-19
lines changed
  • packages/vite/src/node/optimizer

1 file changed

+0
-19
lines changed

packages/vite/src/node/optimizer/index.ts

-19
Original file line numberDiff line numberDiff line change
@@ -668,25 +668,6 @@ export function runOptimizeDeps(
668668
isDynamicEntry: chunk.isDynamicEntry,
669669
})
670670
}
671-
} else {
672-
// workaround Firefox warning by removing blank source map reference
673-
// https://github.com/evanw/esbuild/issues/3945
674-
const output = meta.outputs[o]
675-
// filter by exact bytes of an empty source map
676-
if (output.bytes === 93) {
677-
const jsMapPath = path.resolve(o)
678-
const jsPath = jsMapPath.slice(0, -4)
679-
if (fs.existsSync(jsPath) && fs.existsSync(jsMapPath)) {
680-
const map = JSON.parse(fs.readFileSync(jsMapPath, 'utf-8'))
681-
if (map.sources.length === 0) {
682-
const js = fs.readFileSync(jsPath, 'utf-8')
683-
fs.writeFileSync(
684-
jsPath,
685-
js.slice(0, js.lastIndexOf('//# sourceMappingURL=')),
686-
)
687-
}
688-
}
689-
}
690671
}
691672
}
692673

0 commit comments

Comments
 (0)