Last active
March 31, 2020 21:12
-
-
Save shanerobinson/71163e0997571eb336ccd7aab8d74fc5 to your computer and use it in GitHub Desktop.
PostCSS Config file for Svelte Sapper site using Tailwind and Markdown files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const tailwindcss = require("tailwindcss"); | |
const cssnano = require('cssnano'); | |
const purgecss = require("@fullhuman/postcss-purgecss")({ | |
content: ["./src/**/*.svelte", "./src/**/*.html", "./src/**/*.md"], | |
defaultExtractor: content => content.match(/[A-Za-z0-9-_:/]+/g) || [] | |
}); | |
module.exports = { | |
plugins: [ | |
tailwindcss("./tailwind.js"), | |
require('cssnano')({ | |
preset: 'default', | |
}), | |
...(process.env.NODE_ENV === "production" ? [purgecss] : []), | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment