Skip to content

Commit

Permalink
fix: include content key along with purge from tw config
Browse files Browse the repository at this point in the history
  • Loading branch information
apvarun authored Oct 24, 2023
1 parent 8d7651e commit f04df08
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ async function run() {
const tailwindConfig = readModule(join(root, '/tailwind.config.js'));
if (
!tailwindConfig ||
!tailwindConfig.purge ||
tailwindConfig.purge.length === 0
(!tailwindConfig.purge ||
tailwindConfig.purge.length === 0) && (!tailwindConfig.content ||
tailwindConfig.content.length === 0)
) {
console.log(
'Ensure that files to `purge` are configured in your tailwind config file'
'Ensure that files to `purge/content` are configured in your tailwind config file'
);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
purge: ['./app/src/**/*.{js,ts,jsx,tsx}'],
content: ['./app/src/**/*.{js,ts,jsx,tsx}'],
mode: 'jit',
darkMode: false, // or 'media' or 'class'
theme: {
Expand Down

0 comments on commit f04df08

Please sign in to comment.