Skip to content

Commit

Permalink
fix rule regexp generation
Browse files Browse the repository at this point in the history
  • Loading branch information
sastan committed Nov 13, 2022
1 parent a7ca73e commit abb35f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/young-rice-explain.md
@@ -0,0 +1,5 @@
---
'@twind/preset-tailwind-forms': patch
---

fix rule regexp generation
7 changes: 1 addition & 6 deletions packages/preset-tailwind-forms/src/preset-tailwind-forms.ts
Expand Up @@ -24,12 +24,7 @@ export default function presetTailwindForms({
if (strategy !== 'base') {
config.rules = [
[
'(' +
rules
.map((r) => r.c)
.filter(Boolean)
.join('|') +
')',
'(' + [...new Set(rules.flatMap((r) => r.c).filter(Boolean))].join('|') + ')',
(match, context) =>
({
'@layer base': rules
Expand Down

0 comments on commit abb35f5

Please sign in to comment.