@@ -312,27 +312,41 @@ module.exports = function( grunt ) {
312312 files : [ "<%= eslint.dev.src %>" ] ,
313313 tasks : [ "dev" ]
314314 } ,
315- terser : {
315+ minify : {
316316 all : {
317317 files : {
318318 "dist/<%= grunt.option('filename').replace('.js', '.min.js') %>" :
319319 "dist/<%= grunt.option('filename') %>"
320320 } ,
321321 options : {
322- ecma : 5 ,
323322 sourceMap : {
324- filename : "dist/<%= grunt.option('filename').replace('.js', '.min.map') %>"
325- } ,
326- format : {
327- ascii_only : true ,
328- comments : false ,
329- preamble : "/*! jQuery v<%= pkg.version %> | " +
330- "(c) OpenJS Foundation and other contributors | " +
331- "jquery.org/license */"
323+ filename : "dist/<%= grunt.option('filename').replace('.js', '.min.map') %>" ,
324+
325+ // The map's `files` & `sources` property are set incorrectly, fix
326+ // them via overrides from the task config.
327+ // See https://github.com/swc-project/swc/issues/7588#issuecomment-1624345254
328+ overrides : {
329+ file : "jquery.min.js" ,
330+ sources : [
331+ "jquery.js"
332+ ]
333+ }
332334 } ,
333- compress : {
334- hoist_funs : false ,
335- loops : false
335+ swc : {
336+ format : {
337+ ecma : 5 ,
338+ asciiOnly : true ,
339+ comments : false ,
340+ preamble : "/*! jQuery v4.0.0-pre | " +
341+ "(c) OpenJS Foundation and other contributors | " +
342+ "jquery.org/license */\n"
343+ } ,
344+ compress : {
345+ ecma : 5 ,
346+ hoist_funs : false ,
347+ loops : false
348+ } ,
349+ mangle : true
336350 }
337351 }
338352 }
@@ -400,7 +414,7 @@ module.exports = function( grunt ) {
400414 grunt . registerTask ( "dev" , [
401415 "build:*:*" ,
402416 runIfNewNode ( "newer:eslint:dev" ) ,
403- "newer:terser " ,
417+ "newer:minify " ,
404418 "remove_map_comment" ,
405419 "dist:*" ,
406420 "qunit_fixture" ,
@@ -410,7 +424,7 @@ module.exports = function( grunt ) {
410424 grunt . registerTask ( "default" , [
411425 runIfNewNode ( "eslint:dev" ) ,
412426 "build:*:*" ,
413- "terser " ,
427+ "minify " ,
414428 "remove_map_comment" ,
415429 "dist:*" ,
416430 "test:prepare" ,
0 commit comments