mirror of
https://github.com/hanzoai/tailwindcss.git
synced 2026-09-24 17:03:14 +00:00
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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user