From a34e04dfab96bc769948d8e1ed2bfe118df1c224 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Fri, 10 Mar 2023 12:44:08 +0100 Subject: [PATCH] trim tailwindcss --- frontend/tailwind.config.cjs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/frontend/tailwind.config.cjs b/frontend/tailwind.config.cjs index b25ba4e5ab..a6b97ae108 100644 --- a/frontend/tailwind.config.cjs +++ b/frontend/tailwind.config.cjs @@ -7,16 +7,17 @@ const config = { 'hljs', 'splitpanes__pane', 'splitpanes__splitter', + ...(process.env.NODE_ENV === 'production' ? [ - { pattern: /^m(\w?)-/ }, - { pattern: /^p(\w?)-/ }, - { pattern: /^shadow-/ }, - { pattern: /^rounded-/ }, - { pattern: /^text-/, variants: ['hover', 'active', 'focus'] }, - { pattern: /^bg-/, variants: ['hover', 'active', 'focus'] }, - { pattern: /^border-/, variants: ['hover', 'active', 'focus'] }, - { pattern: /^ring-/, variants: ['hover', 'active', 'focus'] } + { pattern: /^m(\w?)-.*$/ }, + { pattern: /^p(\w?)-.*$/ }, + { pattern: /^shadow-.*$/ }, + { pattern: /^rounded-.*$/ }, + { pattern: /^text-[^/]*$/, variants: ['hover', 'active', 'focus'] }, + { pattern: /^bg-[^/]*$/, variants: ['hover', 'active', 'focus'] }, + { pattern: /^border-[^/]*$/, variants: ['hover', 'active', 'focus'] }, + { pattern: /^ring-[^/]*$/, variants: ['hover', 'active', 'focus'] } ] : []) ],