mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
Fix map file reference in .min.js file.
This commit is contained in:
parent
58003c44ff
commit
e348b40608
@ -432,11 +432,14 @@ module.exports = function( grunt ) {
|
|||||||
nonascii = true;
|
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
|
// see https://github.com/mishoo/UglifyJS2/issues/47
|
||||||
if ( /\.map$/.test( filename ) ) {
|
if ( /\.map$/.test( filename ) ) {
|
||||||
text = text.replace( /"dist\//g, "\"" );
|
text = text.replace( /"dist\//g, "\"" );
|
||||||
fs.writeFileSync( filename, text, "utf-8" );
|
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
|
// Optionally copy dist files to other locations
|
||||||
|
Loading…
Reference in New Issue
Block a user