]> source.dussan.org Git - jquery.git/commitdiff
Fix #14415. Remove the source map comment in the release script. Close gh-1424. ...
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:25:42 +0000 (23:25 +0100)
build/release.js

index 294c10330287c36310437cd9e27a05fee61714af..c04bd02222afde87a4ed55a3e7790ed9b773b350 100644 (file)
@@ -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 );