From d88bcfac6001de7c9f392c05c37feda7e29d2512 Mon Sep 17 00:00:00 2001 From: Cosmin Popovici Date: Thu, 8 Oct 2026 15:25:48 +0300 Subject: [PATCH 1/2] fix: warn when a style tag fails to compile Co-Authored-By: Claude Opus 5.5 (1M context) --- src/tests/transformers/tailwindcss.test.ts | 20 ++++++++++++++++++++ src/transformers/tailwindcss.ts | 4 +++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/tests/transformers/tailwindcss.test.ts b/src/tests/transformers/tailwindcss.test.ts index a9e21387..fd3c4f28 100644 --- a/src/tests/transformers/tailwindcss.test.ts +++ b/src/tests/transformers/tailwindcss.test.ts @@ -222,6 +222,26 @@ describe('tailwindcss', () => { expect(result).toContain('@import "./nonexistent.css"') expect(result).not.toContain('"') }) + + it('warns when a style tag fails to compile', async () => { + const { warn, error } = console + const warnings: string[] = [] + console.warn = (message: string) => warnings.push(message) + console.error = () => {} + + try { + const result = await run('', '/path/to/emails/welcome.vue') + + expect(result).toContain('@import "./nonexistent.css"') + expect(warnings).toHaveLength(1) + expect(warnings[0]).toContain('[maizzle]') + expect(warnings[0]).toContain('', '/path/to/emails/welcome.vue') + // Raw and empty tags aren't compiled but still count towards the position + const html = '' + const result = await run(html, '/path/to/emails/welcome.vue') expect(result).toContain('@import "./nonexistent.css"') expect(warnings).toHaveLength(1) expect(warnings[0]).toContain('[maizzle]') - expect(warnings[0]).toContain('