File tree Expand file tree Collapse file tree 1 file changed +0
-19
lines changed
packages/vite/src/node/optimizer Expand file tree Collapse file tree 1 file changed +0
-19
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments