Extracting only the css used in a specific page

前端 未结 15 2037
难免孤独
难免孤独 2020-12-04 06:51

Say you had a dynamically generated site that has been worked on by too many people, past and present, and you now have a collection of shared stylesheets that contain over

15条回答
  •  清歌不尽
    2020-12-04 07:43

    Check for PurifyCSS, and this for those who can handle CLI or Gulp/Grunt/Webpack

    You can remove the unused style from single page or multiple page or from the entire project, even though the classes are being injected by javascript.

    If you can google, there are tons of resources out there from which you can learn about PurifyCSS.

提交回复
热议问题