From: Michał Gołębiowski Date: Sat, 9 Nov 2013 22:55:32 +0000 (+0100) Subject: Fix #14415. Remove the source map comment in the release script. Close gh-1424. ... X-Git-Tag: 1.11.0-beta2~23 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3fa4f48d5c05fcb66b31b4794cad797193410971;p=jquery.git Fix #14415. Remove the source map comment in the release script. Close gh-1424. (cherry-picked from 562145e887cc42ce8c9c9cd2c6e946ff01e6731d) --- diff --git a/build/release.js b/build/release.js index 294c10330..c04bd0222 100644 --- a/build/release.js +++ b/build/release.js @@ -164,12 +164,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 );