From fb360f2274055c4ac704b93a1d438a354d2d0de8 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 16 May 2019 13:14:30 +0100 Subject: [PATCH] Add and require laravel-mix-purgecss --- web/themes/contrib/tailwindcss/package.json | 1 + web/themes/contrib/tailwindcss/webpack.mix.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/web/themes/contrib/tailwindcss/package.json b/web/themes/contrib/tailwindcss/package.json index 6756e18..20ccd82 100644 --- a/web/themes/contrib/tailwindcss/package.json +++ b/web/themes/contrib/tailwindcss/package.json @@ -7,6 +7,7 @@ "devDependencies": { "cross-env": "^5.2.0", "laravel-mix": "^2.1.14", + "laravel-mix-purgecss": "^4.1.0", "tailwindcss": "^1.0.1" } } diff --git a/web/themes/contrib/tailwindcss/webpack.mix.js b/web/themes/contrib/tailwindcss/webpack.mix.js index 5d6ea83..7f035f4 100644 --- a/web/themes/contrib/tailwindcss/webpack.mix.js +++ b/web/themes/contrib/tailwindcss/webpack.mix.js @@ -1,5 +1,7 @@ let mix = require('laravel-mix'); +require('laravel-mix-purgecss') + mix.postCss('src/main.css', 'dist', [ require('tailwindcss')('./tailwind.config.js'), ])