File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -314,7 +314,7 @@ function writeJsonSync( fname, json ) {
314314}
315315
316316function fixMinRef ( oldText ) {
317- var mapRef = new RegExp ( "^//# sourceMappingURL=jquery-migrate.min .map\\n?" , "m" ) ;
317+ var mapRef = new RegExp ( "^//# sourceMappingURL=jquery-migrate\\..*\\ .map\\n?" , "m" ) ;
318318
319319 // Remove the ref for now rather than try to fix it
320320 var newText = oldText . replace ( mapRef , "" ) ;
@@ -333,7 +333,14 @@ function fixMapRef( oldText, newFile ) {
333333
334334 // This file isn't published, not sure the best way to deal with that
335335 sources [ 0 ] = "migratemute.js" ;
336- sources [ 1 ] = newFile . replace ( / \. m a p $ / , ".js" ) ;
336+ sources [ 1 ] = newFile . replace ( / \. m i n \. m a p $ / , ".js" ) ;
337+
338+ // Path to the minified file for which this is the map.
339+ // The minified file is originally created from a versionless file,
340+ // so this field needs to be regenerated to contain the version
341+ // if `newFile` contains it.
342+ mapJSON . file = newFile . replace ( / \. m i n \. m a p $ / , ".min.js" ) ;
343+
337344 return JSON . stringify ( mapJSON ) ;
338345}
339346
You can’t perform that action at this time.
0 commit comments