@@ -37,11 +37,9 @@ function applyVariant(variant, matches, { variantMap }) {
37
37
let [ variantSort , applyThisVariant ] = variantMap . get ( variant )
38
38
let result = [ ]
39
39
40
- for ( let [ { sort, layer } , rule ] of matches ) {
41
- let options = rule . __tailwind ?? { }
42
-
40
+ for ( let [ { sort, layer, options } , rule ] of matches ) {
43
41
if ( options . respectVariants === false ) {
44
- result . push ( [ { sort, layer } , rule ] )
42
+ result . push ( [ { sort, layer, options } , rule ] )
45
43
continue
46
44
}
47
45
@@ -53,7 +51,7 @@ function applyVariant(variant, matches, { variantMap }) {
53
51
continue
54
52
}
55
53
56
- let withOffset = [ { sort : variantSort | sort , layer } , container . nodes [ 0 ] ]
54
+ let withOffset = [ { sort : variantSort | sort , layer, options } , container . nodes [ 0 ] ]
57
55
result . push ( withOffset )
58
56
}
59
57
@@ -115,16 +113,20 @@ function generateRules(tailwindConfig, candidates, context) {
115
113
for ( let [ sort , plugin ] of plugins ) {
116
114
if ( typeof plugin === 'function' ) {
117
115
for ( let result of plugin ( modifier , pluginHelpers ) ) {
116
+ let options = { }
118
117
if ( Array . isArray ( result ) ) {
118
+ ; [ , , options = { } ] = result
119
119
result = toPostCssNode ( result , context . postCssNodeCache )
120
120
}
121
- matches . push ( [ sort , result ] )
121
+ matches . push ( [ { ... sort , options } , result ] )
122
122
}
123
123
} else {
124
+ let options = { }
124
125
if ( Array . isArray ( plugin ) ) {
126
+ ; [ , , options = { } ] = plugin
125
127
plugin = toPostCssNode ( plugin , context . postCssNodeCache )
126
128
}
127
- matches . push ( [ sort , plugin ] )
129
+ matches . push ( [ { ... sort , options } , plugin ] )
128
130
}
129
131
}
130
132
0 commit comments