Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions packages/@tailwindcss-cli/src/commands/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -479,10 +479,14 @@ async function createWatchers(dirs: string[], cb: (files: string[]) => void) {

await Promise.all(
events.map(async (event) => {
// We currently don't handle deleted files because it doesn't influence
// the CSS output. This is because we currently keep all scanned
// candidates in a cache for performance reasons.
if (event.type === 'delete') return
// We track deleted files so that a full rebuild can surface missing
// file errors (e.g. a deleted config dependency). Deleted content files
// are also tracked here but are harmless — they still hit the candidate
// cache so scanFiles returns empty and we bail early.
if (event.type === 'delete') {
files.add(event.path)
return
}

// Ignore directory changes. We only care about file changes
let stats: Stats | null = null
Expand Down