I have the same issue as on this topic.
And also can see that it was solved few months ago.
Just updated hugo to v0.152.2, but still have the same issue.
How to solve this problem?
Share what you have done.
See Requesting Help.
Let us see your code
Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick git clone on your repo, then run hugo server in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.
If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.
I’m with jmooring, need to see the code to be able to run it through an instance on my end to see if I can replicate the issue. At the very least a representative example that shows how you’re trying it and the context of it.
A few things outside of Hugo itself can cause it as well. For instance, if you pipe the context through more than just minify, the orders of the other piped functions may have to be changed. Being able to review the code would enlighten us on that.
@drone.ah @jmooring Here is REPO
What’s the issue. I use tailwind and based on this instruction created css.html:
but then I inspect the site I can see that my css file is not minified:
Look at the source on disk. If the browser dev tools were to show you the minified version when you inspect the CSS, they’d be doing a very poor job.
Check the CSS file directly by opening the stylesheet link http://localhost:1313/css/style.{signature}.css. You will see that it is indeed minified.
Your screenshot actually confirms this (notice it only has 2 lines).
DevTools is using source maps/pretty print to format the code for readability.
Hmm… you are right guys. In my main project I don’t have these minified css files. Just one style.css unminified. Will try to get what’s the problem and why it works in demo project. Sorry
This page css.TailwindCSS was updated on August 22nd. Are you sure what you have matches what’s in that page? I advise you to reconfigure Tailwind CSS afresh using the instructions in that page.
Also note that CSS is only minified in production, hence {{ $opts := dict "minify" (not hugo.IsDevelopment) }}.

