diff options
author | Dave Methvin <dave.methvin@gmail.com> | 2013-01-10 10:35:50 -0500 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2013-01-10 10:50:25 -0500 |
commit | 2ff2d1d3dcd99f7bd45fa312ba91bb1248cb6d55 (patch) | |
tree | f76ccdf028f4108c0b7f973c2c59c41e0a9bf943 /Gruntfile.js | |
parent | ca49ef98d51e8a79ee70d5339a662dead5711165 (diff) | |
download | jquery-2ff2d1d3dcd99f7bd45fa312ba91bb1248cb6d55.tar.gz jquery-2ff2d1d3dcd99f7bd45fa312ba91bb1248cb6d55.zip |
Fix #12886. Fix map file reference in .min.js file.
Cherry picked from e348b4060848b46a6c4376661c093e0f0a3ef9e7 .
Diffstat (limited to 'Gruntfile.js')
-rw-r--r-- | Gruntfile.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Gruntfile.js b/Gruntfile.js index eb56098d4..f18d071a0 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -432,11 +432,14 @@ module.exports = function( grunt ) { nonascii = true; } - // Modify map so that it points to files in the same folder; + // Modify map/min so that it points to files in the same folder; // see https://github.com/mishoo/UglifyJS2/issues/47 if ( /\.map$/.test( filename ) ) { text = text.replace( /"dist\//g, "\"" ); fs.writeFileSync( filename, text, "utf-8" ); + } else if ( /\.min\.js$/.test( filename ) ) { + text = text.replace( /sourceMappingURL=dist\//, "sourceMappingURL=" ); + fs.writeFileSync( filename, text, "utf-8" ); } // Optionally copy dist files to other locations |