@@ -409,7 +409,9 @@ function buildPluginApi(tailwindConfig, context, { variantList, variantMap, offs
409409 context . candidateRuleMap . set ( identifier , [ ] )
410410 }
411411
412- context . candidateRuleMap . get ( identifier ) . push ( [ { sort : offset , layer : 'components' } , rule ] )
412+ context . candidateRuleMap
413+ . get ( identifier )
414+ . push ( [ { sort : offset , layer : 'components' , options } , rule ] )
413415 }
414416 } ,
415417 addUtilities ( utilities , options ) {
@@ -433,7 +435,9 @@ function buildPluginApi(tailwindConfig, context, { variantList, variantMap, offs
433435 context . candidateRuleMap . set ( identifier , [ ] )
434436 }
435437
436- context . candidateRuleMap . get ( identifier ) . push ( [ { sort : offset , layer : 'utilities' } , rule ] )
438+ context . candidateRuleMap
439+ . get ( identifier )
440+ . push ( [ { sort : offset , layer : 'utilities' , options } , rule ] )
437441 }
438442 } ,
439443 matchBase : function ( base ) {
@@ -451,13 +455,22 @@ function buildPluginApi(tailwindConfig, context, { variantList, variantMap, offs
451455 context . candidateRuleMap . get ( identifier ) . push ( ...withOffsets )
452456 }
453457 } ,
454- matchUtilities : function ( utilities ) {
458+ matchUtilities : function ( utilities , options ) {
459+ let defaultOptions = {
460+ variants : [ ] ,
461+ respectPrefix : true ,
462+ respectImportant : true ,
463+ respectVariants : true ,
464+ }
465+
466+ options = { ...defaultOptions , ...options }
467+
455468 let offset = offsets . utilities ++
456469
457470 for ( let identifier in utilities ) {
458471 let value = [ ] . concat ( utilities [ identifier ] )
459472
460- let withOffsets = value . map ( ( rule ) => [ { sort : offset , layer : 'utilities' } , rule ] )
473+ let withOffsets = value . map ( ( rule ) => [ { sort : offset , layer : 'utilities' , options } , rule ] )
461474
462475 if ( ! context . candidateRuleMap . has ( identifier ) ) {
463476 context . candidateRuleMap . set ( identifier , [ ] )
0 commit comments