Use object in recordCandidates
This commit is contained in:
parent
90209cfda8
commit
3192f2a007
1 changed files with 9 additions and 3 deletions
|
|
@ -345,9 +345,15 @@ function* resolveMatchedPlugins(parsed, context) {
|
|||
}
|
||||
}
|
||||
|
||||
function* recordCandidates(matches, classCandidate) {
|
||||
function* recordCandidates(matches, candidate) {
|
||||
for (const match of matches) {
|
||||
match[1].raws.tailwind = { ...match[1].raws.tailwind, classCandidate }
|
||||
match[1].raws.tailwind = {
|
||||
...match[1].raws.tailwind,
|
||||
classCandidate: candidate.withoutVariants,
|
||||
|
||||
// todo: rename?
|
||||
parsedCandidate: candidate,
|
||||
}
|
||||
|
||||
yield match
|
||||
}
|
||||
|
|
@ -472,7 +478,7 @@ function* resolveMatches(candidate, context) {
|
|||
}
|
||||
|
||||
matches = matches.flat()
|
||||
matches = Array.from(recordCandidates(matches, classCandidate))
|
||||
matches = Array.from(recordCandidates(matches, parsed))
|
||||
matches = applyPrefix(matches, context)
|
||||
|
||||
if (important) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue