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: 2.1.0-beta2~25 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F1424%2Fhead;p=jquery.git Fix #14415. Remove the source map comment in the release script. Close gh-1424. --- 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 );