Skip to content

Commit 9ccdf87

Browse files
Adding watch files in renderStart doesn't make sense
1 parent 822f173 commit 9ccdf87

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

packages/@tailwindcss-vite/src/index.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,15 @@ export default function tailwindcss(): Plugin[] {
419419
// by vite:css-post.
420420
async renderStart() {
421421
for (let [id, root] of roots.entries()) {
422-
let generated = await regenerateOptimizedCss(root, (file) => this.addWatchFile(file))
422+
let generated = await regenerateOptimizedCss(
423+
root,
424+
// During the renderStart phase, we can not add watch files since
425+
// those would not be causing a refresh of the right CSS file. This
426+
// should not be an issue since we did already process the CSS file
427+
// before and the dependencies should not be changed (only the
428+
// candidate list might have)
429+
() => {},
430+
)
423431
if (!generated) {
424432
roots.delete(id)
425433
continue

0 commit comments

Comments
 (0)