start incremental rebuild work on PostCss
This commit is contained in:
parent
ac3f03a07e
commit
316190fe5a
1 changed files with 6 additions and 2 deletions
|
|
@ -51,9 +51,11 @@ function tailwindcss(opts: PluginOptions = {}): AcceptedPlugin {
|
|||
root.append(postcss.parse(output, result.opts))
|
||||
}
|
||||
|
||||
let compileResult = compile(root.toString(), [])
|
||||
|
||||
// No `@tailwind` means we don't have to look for candidates
|
||||
if (!hasTailwind) {
|
||||
replaceCss(compile(root.toString(), []).css)
|
||||
replaceCss(compileResult.css)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -83,7 +85,9 @@ function tailwindcss(opts: PluginOptions = {}): AcceptedPlugin {
|
|||
})
|
||||
}
|
||||
|
||||
replaceCss(compile(root.toString(), candidates).css)
|
||||
console.time('Compile')
|
||||
replaceCss(compileResult.rebuild(candidates))
|
||||
console.timeEnd('Compile')
|
||||
},
|
||||
],
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue