From 6b9ace26799f5dbcdefb64a6175fc52cf205a4da Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Wed, 16 Apr 2025 18:04:03 -0400 Subject: [PATCH] Track utilities generated by `@apply` --- packages/tailwindcss/src/apply.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/tailwindcss/src/apply.ts b/packages/tailwindcss/src/apply.ts index 6038c4b8d..0b7b3ad16 100644 --- a/packages/tailwindcss/src/apply.ts +++ b/packages/tailwindcss/src/apply.ts @@ -167,8 +167,13 @@ export function substituteAtApply(ast: AstNode[], designSystem: DesignSystem) { }, }) + let src = node.src let candidateAst = compiled.astNodes + walk(candidateAst, (node) => { + node.src = src + }) + // Collect the nodes to insert in place of the `@apply` rule. When a rule // was used, we want to insert its children instead of the rule because we // don't want the wrapping selector.