Meta tags:
author= Full Human;
keywords= purgecss, css, unused css, remove css, optimize css, tailwindcss, postcss, webpack, purge;
description= PurgeCSS is a tool to remove unused CSS from your project;
Headings (most frequently used words):
how, to, use, with, ant, design,
Text of the page (most frequently used words):
the (14), css (12), content (10), purgecss (9), with (8), paths (7), glob (6), ant (6), #design (6), use (5), antd (5), react (5), how (4), sync (4), require (4), const (4), languages (4), this (3), extractor (3), extractors (3), file (3), selectors (3), from (3), appnodemodules (3), button (3), api (3), modules (2), page (2), extensions (2), match (2), and (2), that (2), keep (2), you (2), below (2), addpostcssplugins (2), override (2), true (2), nodir (2), postcss (2), app (2), then (2), using (2), configuration (2), your (2), files (2), found (2), github (2), français (2), english (2), reference (2), prev, floriel, ffloriel, contributors, last, updated, edit, wrote, for, intend, get, entirely, could, replace, essentially, added, path, want, example, process, env, production, node_env, module, exports, appsrc, apphtml, fullhuman, customize, cra, scripts, config, all, way, project, was, created, create, rewired, extend, case, list, used, cannot, retrieve, easily, its, works, comparing, ones, when, component, libraries, their, own, happens, removed, because, not, need, specify, where, can, comes, issue, tips, common, questions, comparison, hugo, wordpress, razzle, nuxt, next, vue, guides, gatsby, grunt, gulp, webpack, plugins, safelisting, programmatic, command, line, interface, getting, started, about,
Text of the page (random words):
ant design purgecss purgecss api reference languages languages english français github api reference languages languages english français github purgecss about purgecss getting started configuration command line interface programmatic api safelisting extractors plugins postcss webpack gulp grunt gatsby guides vue react next js nuxt js razzle wordpress hugo comparison common questions how to use with css modules how to use with ant design how to use with ant design tips the content of this page comes from this issue purgecss works by comparing the selectors in your content files with the ones on your css files when using component libraries with their own css it happens the css is removed because the content is not found you then need to specify where the content can be found in the case of ant design the list of selectors used in ant design cannot be retrieve easily from its content below is a way to use purgecss with ant design and react the project was created with create react app then it is using react app rewired to extend the configuration const glob require glob all const paths require react scripts config paths const override addpostcssplugins require customize cra const purgecss require fullhuman postcss purgecss content paths apphtml glob sync paths appsrc js nodir true glob sync paths appnodemodules antd es button css nodir true extractors extractor content content match a za z g extensions css module exports override addpostcssplugins process env node_env production purgecss i essentially added a path to the antd css file that i want to keep in the example below button glob sync paths appnodemodules antd es button css to keep antd entirely you could replace by glob sync paths appnodemodules antd es css and wrote an extractor for css file that intend to get the selectors from the file extractors extractor content content match a za z g extensions css edit this page last updated 2 18 22 3 11 pm contributors ffloriel floriel prev how to use with css modules
|