2023-06-09
2460
#css
Hamsa Harcourt
84343
Jun 9, 2023 â‹… 8 min read

Guide to removing unused CSS code with PurgeCSS

Hamsa Harcourt I'm Hamsa, a software engineer with a strong passion for building human-centric products. I love teaching concepts about JavaScript and the web at large.

Recent posts:

D3 Js Adoption Guide: Overview, Examples, And Alternatives

D3.js adoption guide: Overview, examples, and alternatives

D3.js is a powerful JavaScript library for creating tailored data visualizations. Let’s see why you should use D3.js in your next project.

Eze Sunday
Jan 19, 2024 â‹… 10 min read
Using Semantic-Release To Automate Releases And Changelogs

Using semantic-release to automate releases and changelogs

Demonstrate how to automate releases and release notes with semantic-release in GitLab.

Sebastian Weber
Jan 18, 2024 â‹… 10 min read
React Native Push Notifications A Complete How To Guide

React Native push notifications: A complete how-to guide

Learn all about how to implement push notifications in React Native in this ultimate guide and step-by-step tutorial.

Fortune Ikechi
Jan 17, 2024 â‹… 12 min read
Exploring Effect A Meta State Rxjs Like Framework For Writing Typescript

Exploring Effect, a meta-state RxJS-like framework

The Effect library helps you better handle async code, types in async scenarios, and errors in TypeScript projects. Let’s see how.

Isaac Okoro
Jan 17, 2024 â‹… 6 min read
View all posts

5 Replies to "Guide to removing unused CSS code with PurgeCSS"

    1. Keep in mind that PurgeCSS doesn’t touch your source CSS files, just the ones that are output by the build process. So if you add new code that needs CSS rules that were previously purged, then the next time you build your app PurgeCSS will see that your code is using some new rules and will not purge them in that build.

  1. In frameworks such as Angular, you can use scss which is complied down to css. Is there any way to achieve this on scss?

Leave a Reply