Permalink
Browse files

Fix #12886. Fix map file reference in .min.js file.

Cherry picked from e348b40 .
  • Loading branch information...
dmethvin committed Jan 10, 2013
1 parent ca49ef9 commit 2ff2d1d3dcd99f7bd45fa312ba91bb1248cb6d55
Showing with 4 additions and 1 deletion.
  1. +4 −1 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

0 comments on commit 2ff2d1d

Please sign in to comment.