Skip to content

Instantly share code, notes, and snippets.

@ukchukx
Created January 21, 2020 20:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ukchukx/551b60bf30c45909a34c41295b050920 to your computer and use it in GitHub Desktop.
Save ukchukx/551b60bf30c45909a34c41295b050920 to your computer and use it in GitHub Desktop.
const purgecss = require('@fullhuman/postcss-purgecss')({
content: ['./src/**/*.svelte', './src/**/*.html'],
whitelistPatterns: [/svelte-/],
defaultExtractor: content => content.match(/[A-Za-z0-9-_:/]+/g) || []
})
module.exports = {
plugins: [
require('tailwindcss'),
...(!process.env.ROLLUP_WATCH ? [purgecss] : [])
]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment