Skip to content

Commit

Permalink
purgecss removed as it is unnecessary
Browse files Browse the repository at this point in the history
  • Loading branch information
anilsenay committed Jul 24, 2020
1 parent 60ccd43 commit 1b7d1af
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions postcss.config.js
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"],
};

0 comments on commit 1b7d1af

Please sign in to comment.