Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently in the new
JIT
mode, we can't really use a RegExp for safelisting, because we don't have anything to match against. In AOT mode we generated everything, then when we apply the purge step, we could remove everything except of safelisted values.This PR provides a way to apply safelisting using RegExp as well, but with a slightly different syntax:
Sadly we can't generate all possible combinations and then test each option against the RegExp... why not? Well...
We have
100
variants (which you can combine) and we have about6575
utilities by default.Instead, we generate the
6575
base utilities. These don't have any variants, e.g.:text-gray-200
.We then test the RegExp against these values. If they match, we generate the combinations using the
variants
you provide in the list.