From 562145e887cc42ce8c9c9cd2c6e946ff01e6731d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski?= Date: Sat, 9 Nov 2013 23:55:32 +0100 Subject: [PATCH] Fix #14415. Remove the source map comment in the release script. Close gh-1424. --- build/release.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/build/release.js b/build/release.js index 973338a88..2a762cf08 100644 --- a/build/release.js +++ b/build/release.js @@ -165,12 +165,10 @@ function makeReleaseCopies( next ) { "\",\"sources\":[\"" + unpathedFile.replace( /\.min\.map/, ".js" ) + "\"]" ); fs.writeFileSync( releaseFile, text ); } else if ( /\.min\.js$/.test( releaseFile ) ) { - // Minified files point back to the corresponding map; - // again assume one big happy directory. - // "//# sourceMappingURL=jquery.min.map" + // Remove the source map comment; it causes way too many problems. + // Keep the map file in case DevTools allow manual association. text = fs.readFileSync( builtFile, "utf8" ) - .replace( /\/\/# sourceMappingURL=\S+/, - "//# sourceMappingURL=" + unpathedFile.replace( /\.js$/, ".map" ) ); + .replace( /\/\/# sourceMappingURL=\S+/, "" ); fs.writeFileSync( releaseFile, text ); } else if ( builtFile !== releaseFile ) { copy( builtFile, releaseFile ); -- 2.39.5