File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
packages/@tailwindcss-vite/src Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,8 @@ export default function tailwindcss(opts: PluginOptions = {}): Plugin[] {
3030 let config : ResolvedConfig | null = null
3131
3232 let isSSR = false
33- let shouldOptimize = false
34- let minify = false
33+ let shouldOptimize = true
34+ let minify = true
3535
3636 let roots : DefaultMap < string , Root > = new DefaultMap ( ( id ) => {
3737 let cssResolver = config ! . createResolver ( {
@@ -75,15 +75,14 @@ export default function tailwindcss(opts: PluginOptions = {}): Plugin[] {
7575 config = _config
7676 isSSR = config . build . ssr !== false && config . build . ssr !== undefined
7777
78- // By default we optimize CSS during the build phase unless NODE_ENV is `development`
79- shouldOptimize = process . env . NODE_ENV !== 'development'
80-
81- // But if the user provides explicit options we'll use to those instead
78+ // By default we optimize CSS during the build phase but if the user
79+ // provides explicit options we'll use to those instead
8280 if ( opts . optimize !== undefined ) {
8381 shouldOptimize = opts . optimize !== false
8482 }
8583
86- // Minification is also performed when optimizing as long as it's also enabled in Vite
84+ // Minification is also performed when optimizing as long as it's also
85+ // enabled in Vite
8786 minify = shouldOptimize && config . build . cssMinify !== false
8887
8988 // But again, the user can override that choice explicitly
You can’t perform that action at this time.
0 commit comments