when using { optimize: true }, also minify the CSS (#13201)
If you don't want to minify, but you do want to optimize, then you can
use `{ optimize: { minify: false} }` instead.
This commit is contained in:
parent
8123fa513a
commit
b7dd979735
1 changed files with 2 additions and 2 deletions
|
|
@ -7,7 +7,7 @@ type PluginOptions = {
|
|||
// The base directory to scan for class candidates.
|
||||
base?: string
|
||||
|
||||
// Optimize the output CSS.
|
||||
// Optimize and minify the output CSS.
|
||||
optimize?: boolean | { minify?: boolean }
|
||||
}
|
||||
|
||||
|
|
@ -45,7 +45,7 @@ function tailwindcss(opts: PluginOptions = {}): AcceptedPlugin {
|
|||
let output = css
|
||||
if (optimize) {
|
||||
output = optimizeCss(output, {
|
||||
minify: typeof optimize === 'object' ? optimize.minify : false,
|
||||
minify: typeof optimize === 'object' ? optimize.minify : true,
|
||||
})
|
||||
}
|
||||
root.append(postcss.parse(output, result.opts))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue