How to remove unused CSS in your project

Original link: https://lucifer.ren/blog/2023/08/08/remove-useless-css/

Use chrome’s devtool to view unused JS and CSS in the project. For details, please refer to the official chrome blog: Coverage: Find unused JavaScript and CSS

Is there a way to detect it myself? Is it even made into a tool integrated into CI/CD or even code review?

After reading this article, you can learn how to make such a tool yourself. At the same time, we will also recommend similar libraries that have been verified and useful in the community.

This article is transferred from: https://lucifer.ren/blog/2023/08/08/remove-useless-css/
This site is only for collection, and the copyright belongs to the original author.