CSS minify considerations: gulp-clean-css vs sass({outputStyle: ‘compressed’})

CSS minify is a technique used to reduce the size of CSS files to reduce page load times. However, depending on the tools and settings used, the effect may not always be as significant.

Here we compare two methods: “gulp-clean-css” and “sass({outputStyle: ‘compressed’})”. Both methods can minify CSS, but there is no significant difference in the size of the resulting CSS file. Specifically, Bootstrap results in a reduction from 152kb to 151kb, and main.scss results in a reduction from 44kb to 44kb.

Furthermore, the disadvantage of longer build times also exists. These factors lead us to the conclusion that minify by these two methods is not expected to be very effective. Therefore, we recommend that you consider the necessity and effectiveness of the use of minify depending on the situation of your project.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top