From a0f23d3306374a6c267cbda8d95edbe4b4eaa571 Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Fri, 8 Mar 2024 00:36:21 +0100 Subject: [PATCH] do not clear the Rust cache The candidates from the content files are still going to be correct as long as the file didn't change. --- .../@tailwindcss-cli/src/commands/build/index.ts | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/packages/@tailwindcss-cli/src/commands/build/index.ts b/packages/@tailwindcss-cli/src/commands/build/index.ts index 1ea813667..be8a03fcb 100644 --- a/packages/@tailwindcss-cli/src/commands/build/index.ts +++ b/packages/@tailwindcss-cli/src/commands/build/index.ts @@ -1,12 +1,5 @@ import watcher from '@parcel/watcher' -import { - IO, - Parsing, - clearCache, - scanDir, - scanFiles, - type ChangedContent, -} from '@tailwindcss/oxide' +import { IO, Parsing, scanDir, scanFiles, type ChangedContent } from '@tailwindcss/oxide' import { existsSync } from 'node:fs' import fs from 'node:fs/promises' import path from 'node:path' @@ -164,9 +157,6 @@ export async function handle(args: Result>) { // Scan the entire `base` directory for full rebuilds. if (rebuildStrategy === 'full') { - // Clear the cache because we need to re-scan the entire directory. - clearCache() - // Re-scan the directory to get the new `candidates`. candidates = scanDir({ base }).candidates