diff --git a/packages/@tailwindcss-cli/src/commands/build/index.ts b/packages/@tailwindcss-cli/src/commands/build/index.ts index 823115555a7c..3ca7f4ad0367 100644 --- a/packages/@tailwindcss-cli/src/commands/build/index.ts +++ b/packages/@tailwindcss-cli/src/commands/build/index.ts @@ -236,9 +236,13 @@ export async function handle(args: Result>) { else if (rebuildStrategy === 'incremental') { let newCandidates = scanner.scanFiles(changedFiles) - // No candidates found which means we don't need to rebuild. This can - // happen if a file is detected but doesn't match any of the globs. - if (newCandidates.length <= 0) return + // No new candidates found which means we don't need to write to + // disk, and can return early. + if (newCandidates.length <= 0) { + let end = process.hrtime.bigint() + eprintln(`Done in ${formatDuration(end - start)}`) + return + } compiledCss = compiler.build(newCandidates) }