From 64054f5d20dbc77402174dd71949f00cef022512 Mon Sep 17 00:00:00 2001 From: gimenes Date: Wed, 10 Jul 2024 15:24:44 -0300 Subject: [PATCH] resolve release on tailwind prod build --- plugins/tailwind/mod.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/tailwind/mod.ts b/plugins/tailwind/mod.ts index 4621d771..53e979f5 100644 --- a/plugins/tailwind/mod.ts +++ b/plugins/tailwind/mod.ts @@ -176,11 +176,14 @@ export const plugin = (config?: Config & { verbose?: boolean }): Plugin => { }, // Compatibility mode. Only runs when config is not set directly buildStart: async ({ staticDir }) => { + const cfg = config || await loadTailwindConfig(root); + const css = await bundle({ from: TAILWIND_FILE, mode: "prod", - config: config || await loadTailwindConfig(root), + config: await withReleaseContent(cfg), }); + await Deno.writeTextFile(join(staticDir, TAILWIND_FILE), css); }, };