New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why is css reduced even with everything ignored? #294
Comments
@dhymik I cant see this behaviour, if I run |
I had the same problem. What I noticed is that my SASS compiler seemed to remove the CSS comments, so when it came for PurgeCSS to do its thing, it didn't find any ignore comments in the compiled CSS. I found that strange, because according to SASS language specification, comments should be retained. Maybe |
If you use sass-loader, exactly, sass-loader-minify ... then the comments you wrote to purgecss have been deleted by sass-loader! !! |
The reported issue was caused by the Sass compiler. I solved the issue by modifying the css ignore comments to
Note the exclamation mark behind the opening comment tag. This instructs SASS to leave the comments in even in compress mode. See SASS docs here. |
I have one single scss file being processed by Gulp 4, this is tailwind.scss.
Without purgecss, the resulting css is 1,5 MB in size.
With purgecss in the chain, it is 24 kByte.
With purgecss and everything in tailwind.scss ignored, css size is 600 kByte.
My tailwind.scss file looks like this:
Why is css file size reduced from 1,5 MBytes to 600 kBytes with everything ignored?
The text was updated successfully, but these errors were encountered: