From 89188f50818e99ae5cf40b6180cdffeeb544857a Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Wed, 10 Feb 2021 16:37:34 +0100 Subject: [PATCH] Don't purge CSS in base and component layers The production build was purging input[type=text] styles, because it couldn't find it in the Rails templates. Change config, so it only purges utility classes. --- app/javascript/stylesheets/tailwind.config.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/app/javascript/stylesheets/tailwind.config.js b/app/javascript/stylesheets/tailwind.config.js index 9235247..c24557e 100644 --- a/app/javascript/stylesheets/tailwind.config.js +++ b/app/javascript/stylesheets/tailwind.config.js @@ -1,11 +1,14 @@ const defaultTheme = require('tailwindcss/defaultTheme') module.exports = { - purge: [ - "./app/**/*.html.erb", - "./app/helpers/**/*.rb", - "./app/javascript/**/*.js" - ], + purge: { + layers: ['utilities'], + content: [ + "./app/**/*.html.erb", + "./app/helpers/**/*.rb", + "./app/javascript/**/*.js" + ] + }, darkMode: false, // or 'media' or 'class' theme: { extend: {