Separate optimization and minification in the @tailwindcss/postcss plugin parameters #16282
Closed
rozsazoltan
started this conversation in
Ideas
Replies: 1 comment
-
Forget it. I don’t know what I was looking at this morning, I was just about to reference the type... but that setting is already there. Oh well. tailwindcss/packages/@tailwindcss-postcss/src/index.ts Lines 44 to 50 in 837e240 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
For v3, I needed a code that maps TailwindCSS classes and creates a native CSS file using only the classes I used. Instead of using the CLI (due to parameterization reasons), I solved it with PostCSS like this:
Now, I wanted to implement the v4 engine behind it, and I've already created my solution as follows:
My only problem is that if I don't want to minify the result, I won't be optimizing it either, and as a result, my output will be unnecessarily larger due to the unoptimized structure.
It could be unminified later, but it would be much better if I could separately specify in the PostCSS plugin parameters whether:
optimize: boolean
(existed)minify: boolean
(requested) - default: trueIn the non-optimized result, we can discover oddities like this:
It could be possible to request optimization and then unminify the result, but I believe it would be simpler if I could disable minification externally for the PostCSS-plugin.
Beta Was this translation helpful? Give feedback.
All reactions