-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
purgecss removed as it is unnecessary
- Loading branch information
Showing
1 changed file
with
1 addition
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,5 @@ | ||
// postcss.config.js | ||
const purgecss = require("@fullhuman/postcss-purgecss")({ | ||
// Specify the paths to all of the template files in your project | ||
content: [ | ||
"./src/**/*.html", | ||
"./src/**/*.vue", | ||
"./src/**/*.jsx", | ||
// etc. | ||
], | ||
|
||
// This is the function used to extract class names from your templates | ||
defaultExtractor: (content) => { | ||
// Capture as liberally as possible, including things like `h-(screen-1.5)` | ||
const broadMatches = content.match(/[^<>"'`\s]*[^<>"'`\s:]/g) || []; | ||
|
||
// Capture classes within other delimiters like .block(class="w-1/2") in Pug | ||
const innerMatches = content.match(/[^<>"'`\s.()]*[^<>"'`\s.():]/g) || []; | ||
|
||
return broadMatches.concat(innerMatches); | ||
}, | ||
}); | ||
|
||
module.exports = { | ||
plugins: [ | ||
"tailwindcss", | ||
"autoprefixer", | ||
...(process.env.NODE_ENV === "production" ? [purgecss] : []), | ||
], | ||
plugins: ["tailwindcss", "autoprefixer"], | ||
}; |