PurgeCSSPurgeCSS
API Reference
GitHub
API Reference
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

Home > @fullhuman/purgecss-from-jsx > purgeFromJsx

purgeFromJsx() function

Create function to extract selectors from jsx code

Signature:

declare function purgeFromJsx(options?: acorn.Options): (content: string) => string[];

Parameters

Parameter

Type

Description

options

acorn.Options

(Optional) acorn options

**Returns:**

(content: string) => string[]

function to extract selectors from jsx code

Edit this page