Skip to content

Instantly share code, notes, and snippets.

@danestves
Created January 5, 2020 01:11
Show Gist options
  • Save danestves/a70a5214d76c9a88893eb614c80c3cf0 to your computer and use it in GitHub Desktop.
Save danestves/a70a5214d76c9a88893eb614c80c3cf0 to your computer and use it in GitHub Desktop.
PostCSS config for TailwindCSS
module.exports = {
plugins: [
require("postcss-easy-import"),
require("tailwindcss"),
process.env.NODE_ENV === "production" &&
require("@fullhuman/postcss-purgecss")({
content: [
"./src/pages/**/*.{js,jsx,ts,tsx}",
"./src/components/**/*.{js,jsx,ts,tsx}",
],
defaultExtractor: content => content.match(/[A-Za-z0-9-_:/]+/g) || [],
}),
require("autoprefixer"),
require("cssnano"),
],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment