Skip to content

Instantly share code, notes, and snippets.

@skflowne
Last active August 2, 2020 16:58
Show Gist options
  • Save skflowne/aa7fbac2247161bb65b1a15f2ce26132 to your computer and use it in GitHub Desktop.
Save skflowne/aa7fbac2247161bb65b1a15f2ce26132 to your computer and use it in GitHub Desktop.
const purgecss = require("@fullhuman/postcss-purgecss")({
content: ["./src/**/*.html", "./src/**/*.svelte"],
whitelistPatterns: [/svelte-/],
defaultExtractor: (content) => content.match(/[A-Za-z0-9-_:/]+/g) || [],
})
const dev = process.env.ROLLUP_WATCH
module.exports = {
plugins: [require("tailwindcss"), ...(!dev ? [purgecss] : [])],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment