]> source.dussan.org Git - jquery.git/commitdiff
Fix #14415. Remove the source map comment in the release script. Close gh-1424. 1424/head
authorMichał Gołębiowski <m.goleb@gmail.com>
Sat, 9 Nov 2013 22:55:32 +0000 (23:55 +0100)
committerMichał Gołębiowski <m.goleb@gmail.com>
Sun, 10 Nov 2013 22:24:26 +0000 (23:24 +0100)
build/release.js

index 973338a881eb623e910780f19401e36b59fb78c6..2a762cf08db495bd46285ee01613dfd63e56dc23 100644 (file)
@@ -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 );