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 > purgecss > setOptions

setOptions() function

Load the configuration file from the path

Signature:

export declare function setOptions(configFile?: string): Promise<Options>;

Parameters

Parameter

Type

Description

configFile

string

(Optional) Path of the config file

**Returns:**

Promise<Options>

The options from the configuration file

Exceptions

Error This exception is thrown if the configuration file was not imported

Edit this page