From 4f2079f624393550e109b1e4946d79a69aa50f4e Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Fri, 10 Mar 2023 01:06:55 +0100 Subject: [PATCH] trim tailwind safelist --- .../apps/editor/component/ComponentNavigation.svelte | 1 + frontend/tailwind.config.cjs | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/frontend/src/lib/components/apps/editor/component/ComponentNavigation.svelte b/frontend/src/lib/components/apps/editor/component/ComponentNavigation.svelte index e21bd8a974..564b9115ba 100644 --- a/frontend/src/lib/components/apps/editor/component/ComponentNavigation.svelte +++ b/frontend/src/lib/components/apps/editor/component/ComponentNavigation.svelte @@ -68,6 +68,7 @@ function down(event: KeyboardEvent) { if (!$focusedGrid) { $selectedComponent = getSortedGridItemsOfChildren()[0]?.id + event.preventDefault() } else if ($app.subgrids) { const index = $focusedGrid?.subGridIndex ?? 0 const subgrid = $app.subgrids[`${$selectedComponent}-${index}`] diff --git a/frontend/tailwind.config.cjs b/frontend/tailwind.config.cjs index 746104833c..b25ba4e5ab 100644 --- a/frontend/tailwind.config.cjs +++ b/frontend/tailwind.config.cjs @@ -9,9 +9,14 @@ const config = { 'splitpanes__splitter', ...(process.env.NODE_ENV === 'production' ? [ - { - pattern: /.*/ - } + { 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'] } ] : []) ],