CSS minification in exported webflow site

I’m not able to figure out how to minify CSS, when exporting a webflow site. Using the command-o and clicking minify HTML in the code download popup, I can minify HTML and JS, but not css.

Note, I am not talking about publishing a site with webflow and the related options shown in “advanced options” when publishing, although all are checked. Also advanced hosting options under settings.hosting also have minify CSS as on.

I am assuming most are not downloading projects and using the hosted version of webflow.

I ended up using cssnano cli. Sharing incase it is useful to the community. It made the CSS files 35% smaller even with the default and safest option, dropping from 108K to 70KB, for a small webflow project.

# instructions: https://cssnano.co/docs/getting-started
# [sudo] npm install cssnano --save-dev
# [sudo] npm install postcss-cli --global
# create config file in project root
postcss --replace path/to/the/webflow/css/folder/*.css

PS: use ctrl-o in webflow download dialog box to reveal minify options for HTML and JS

1 Like