Skip to content

Commit b7dd979

Browse files
authored
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.
1 parent 8123fa5 commit b7dd979

File tree

1 file changed

+2
-2
lines changed
  • packages/@tailwindcss-postcss/src

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ type PluginOptions = {
77
// The base directory to scan for class candidates.
88
base?: string
99

10-
// Optimize the output CSS.
10+
// Optimize and minify the output CSS.
1111
optimize?: boolean | { minify?: boolean }
1212
}
1313

@@ -45,7 +45,7 @@ function tailwindcss(opts: PluginOptions = {}): AcceptedPlugin {
4545
let output = css
4646
if (optimize) {
4747
output = optimizeCss(output, {
48-
minify: typeof optimize === 'object' ? optimize.minify : false,
48+
minify: typeof optimize === 'object' ? optimize.minify : true,
4949
})
5050
}
5151
root.append(postcss.parse(output, result.opts))

0 commit comments

Comments
 (0)