Skip to content

Conversation

MUmarShahbaz
Copy link
Contributor

Fixes #3266

Purpose

Issue: PurgeCSS was not working with purgecss.config.js, only with inline config

Solution: Created a Ruby Gem to run PurgeCSS using Configuration defined inside _config.yml.

Now, all assets optimization configs (minifier, terser, purgecss) are together allowing ease of use.

Example of use

Before

Opera Snapshot_2025-08-16_095904_github com

After

Opera Snapshot_2025-08-16_100042_github com

New Logs - Helps in debugging

Opera Snapshot_2025-08-16_095717_github com

Copy link

netlify bot commented Aug 16, 2025

Deploy Preview for relaxed-lollipop-b6bc17 failed. Why did it fail? →

Name Link
🔨 Latest commit e823d9a
🔍 Latest deploy log https://app.netlify.com/projects/relaxed-lollipop-b6bc17/deploys/68a01365bb80db00073bbe31

@MUmarShahbaz
Copy link
Contributor Author

@george-gca here's another one!

@MUmarShahbaz
Copy link
Contributor Author

Note: The Netlify Errors occur because you are installing purgecss post-build to run with purgecss.config.js. With this gem you will need it to be installed pre-build.

Size Stats:

Stat Before After
CSS Directory Size 3.80 MB 2.81 MB
CSS Directory URL here here
Workflow run - here

@george-gca
Copy link
Collaborator

Will definitely took a look at this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PurgeCSS not working
2 participants