diff --git a/packages/tailwindcss/src/source-maps/source-map.ts b/packages/tailwindcss/src/source-maps/source-map.ts index 1e048cdd0..8073b78a0 100644 --- a/packages/tailwindcss/src/source-maps/source-map.ts +++ b/packages/tailwindcss/src/source-maps/source-map.ts @@ -90,7 +90,7 @@ export function createSourceMap({ ast }: { ast: AstNode[] }) { } // Get all the indexes from the mappings - function add(node: AstNode) { + walk(ast, (node: AstNode) => { if (!node.src || !node.dst) return let originalSource = sourceTable.get(node.src[0]) @@ -141,9 +141,7 @@ export function createSourceMap({ ast }: { ast: AstNode[] }) { }, generatedPosition: generatedEnd, }) - } - - walk(ast, add) + }) // Populate for (let source of lineTables.keys()) {