Skip to content

Commit

Permalink
chore(module): improve safelist regex
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincanac committed Feb 14, 2022
1 parent 93c9fe1 commit c636ff2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ export default defineNuxtModule<ModuleOptions>({
],
// Safelist dynamic colors used in preset
safelist: [{
pattern: new RegExp(`bg-(${safeColorsAsRegex})-(100|600|700)`)
pattern: new RegExp(`(hover|disabled|dark:)?bg-(${safeColorsAsRegex})-(100|600|700)`)
}, {
pattern: new RegExp(`text-(${safeColorsAsRegex})-(100|800)`)
pattern: new RegExp(`(dark:)?text-(${safeColorsAsRegex})-(100|800)`)
}, {
pattern: new RegExp(`ring-(${safeColorsAsRegex})-(500)`)
pattern: new RegExp(`(focus:)?ring-(${safeColorsAsRegex})-(500)`)
}]
},
cssPath: resolve(runtimeDir, 'tailwind.css')
Expand Down

1 comment on commit c636ff2

@vercel
Copy link

@vercel vercel bot commented on c636ff2 Feb 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

Please sign in to comment.