about summary refs log tree commit diff
path: root/users/wpcarro/website/blog/themes/tailwind/postcss.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'users/wpcarro/website/blog/themes/tailwind/postcss.config.js')
-rw-r--r--users/wpcarro/website/blog/themes/tailwind/postcss.config.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/users/wpcarro/website/blog/themes/tailwind/postcss.config.js b/users/wpcarro/website/blog/themes/tailwind/postcss.config.js
new file mode 100644
index 000000000000..6efcb774fa7c
--- /dev/null
+++ b/users/wpcarro/website/blog/themes/tailwind/postcss.config.js
@@ -0,0 +1,14 @@
+const purgecss = require('@fullhuman/postcss-purgecss')({
+  content: ['./layouts/**/*.html'],
+  defaultExtractor: content => content.match(/[A-Za-z0-9-_:/]+/g) || []
+})
+
+module.exports = {
+  plugins: [
+    require('tailwindcss'),
+    require('autoprefixer'),
+    ...process.env.NODE_ENV === 'production'
+      ? [purgecss, require('cssnano')]
+      : []
+  ]
+}