Skip to content

Instantly share code, notes, and snippets.

@skflowne
Last active August 5, 2020 23:06
Show Gist options
  • Save skflowne/63696d9c6ba2a31d583a0f5947e1a2fd to your computer and use it in GitHub Desktop.
Save skflowne/63696d9c6ba2a31d583a0f5947e1a2fd to your computer and use it in GitHub Desktop.
const purgecss = require("@fullhuman/postcss-purgecss")({
content: ["./src/**/*.html", "./src/**/*.svelte"],
whitelistPatterns: [/svelte-/, /fa-icon/],
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