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, css, modules,
Text of the page (most frequently used words):
require (11), loader (9), css (9), const (9), with (8), postcss (8), purgecss (8), use (7), react (7), #modules (7), the (6), this (5), module (5), isenvproduction (5), how (4), your (4), shouldusesourcemap (4), options (4), resolve (4), languages (4), return (3), test (3), from (3), scss (3), you (3), getcssmodulelocalident (3), sourcemap (3), loaders (3), preprocessor (3), glob (3), content (3), webpackenv (3), api (3), ant (2), design (2), next (2), page (2), div (2), styles (2), props (2), state (2), type (2), import (2), can (2), syntax (2), jsx (2), sass (2), true (2), getstyleloaders (2), boolean (2), filter (2), paths (2), env (2), plugins (2), cssoptions (2), shoulduserelativeassetpaths (2), publicpath (2), minicssextractplugin (2), isenvdevelopment (2), and (2), was (2), files (2), for (2), github (2), français (2), english (2), reference (2), floriel, ffloriel, contributors, last, updated, edit, classname, mycssclass, render, component, extends, class, default, export, flow, regular, just, like, getlocalident, importloaders, oneof, rules, push, normalize, apphtml, path, appsrc, nodir, join, sync, fullhuman, stage, 2009, flexbox, autoprefixer, preset, flexbugs, fixes, ident, style, production, development, function, exports, process, false, generate_sourcemap, dev, utils, mini, extract, plugin, all, below, way, project, created, create, app, then, ejected, running, npm, run, eject, works, comparing, selectors, ones, when, using, names, classes, are, replaced, hash, reason, working, might, not, straightforward, would, want, comes, refer, answer, more, details, goldmont, issue, tips, common, questions, comparison, hugo, wordpress, razzle, nuxt, vue, guides, gatsby, grunt, gulp, webpack, extractors, safelisting, programmatic, command, line, interface, configuration, getting, started, about,
Text of the page (random words):
css modules 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 css modules tips the content of this page comes from this issue you can refer to the answer by goldmont for more details purgecss works by comparing the selectors in your content files with the ones on your css files when using css modules the names of your classes are replaced by a hash for this reason working with css modules and purgecss might not be as straightforward as you would want it to be below is a way to use purgecss with css modules and react the project was created with create react app then it was ejected running npm run eject const glob require glob all const minicssextractplugin require mini css extract plugin const getcssmodulelocalident require react dev utils getcssmodulelocalident const shouldusesourcemap process env generate_sourcemap false module exports function webpackenv const isenvdevelopment webpackenv development const isenvproduction webpackenv production const shoulduserelativeassetpaths publicpath const getstyleloaders cssoptions preprocessor const loaders isenvdevelopment require resolve style loader isenvproduction loader minicssextractplugin loader options shoulduserelativeassetpaths publicpath loader require resolve css loader options cssoptions loader require resolve postcss loader options ident postcss syntax postcss scss plugins require postcss flexbugs fixes require postcss preset env autoprefixer flexbox no 2009 stage 3 require fullhuman postcss purgecss content paths apphtml glob sync path join paths appsrc js jsx nodir true require postcss normalize filter boolean sourcemap isenvproduction shouldusesourcemap filter boolean if preprocessor loaders push loader require resolve preprocessor options sourcemap isenvproduction shouldusesourcemap return loaders return module rules oneof test module scss sass use getstyleloaders importloaders 2 sourcemap isenvproduction shouldusesourcemap modules true getlocalident getcssmodulelocalident sass loader you can use regular module syntax in your jsx just like this flow import styles from test module scss import as react from react type props type state export default class test extends react component props state render return div classname styles mycssclass div edit this page last updated 2 18 22 3 11 pm contributors ffloriel floriel next how to use with ant design
|