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.