mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Fix #14415. Remove the source map comment in the release script. Close gh-1424.
This commit is contained in:
parent
650f325d8e
commit
562145e887
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user