Adding watch files in renderStart doesn't make sense
This commit is contained in:
parent
822f17381d
commit
9ccdf87576
1 changed files with 9 additions and 1 deletions
|
|
@ -419,7 +419,15 @@ export default function tailwindcss(): Plugin[] {
|
|||
// by vite:css-post.
|
||||
async renderStart() {
|
||||
for (let [id, root] of roots.entries()) {
|
||||
let generated = await regenerateOptimizedCss(root, (file) => this.addWatchFile(file))
|
||||
let generated = await regenerateOptimizedCss(
|
||||
root,
|
||||
// During the renderStart phase, we can not add watch files since
|
||||
// those would not be causing a refresh of the right CSS file. This
|
||||
// should not be an issue since we did already process the CSS file
|
||||
// before and the dependencies should not be changed (only the
|
||||
// candidate list might have)
|
||||
() => {},
|
||||
)
|
||||
if (!generated) {
|
||||
roots.delete(id)
|
||||
continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue