interface Interface {
    afterCompress?: AfterCompressFn | AfterCompressFn[];
    beforeCompress?: BeforeCompressFn | BeforeCompressFn[];
    clone?: boolean;
    comments?: boolean;
    debug?: boolean;
    filename?: string;
    forceMediaMerge?: boolean;
    logger?: (() => void);
    restructure?: boolean;
    sourceMap?: boolean;
    usage?: Usage;
}

Hierarchy

  • MinifyOptions
  • CompressOptions
    • Interface

Properties

afterCompress?: AfterCompressFn | AfterCompressFn[]

Called right after compress() is run.

beforeCompress?: BeforeCompressFn | BeforeCompressFn[]

Called right after parse is run.

clone?: boolean

Transform a copy of input AST if true. Useful in case of AST reuse.

false
comments?: boolean

Specify what comments to leave:

  • 'exclamation' or true – leave all exclamation comments
  • 'first-exclamation' – remove every comment except first one
  • false – remove all comments
Compress false
csso true
debug?: boolean

Output debug information to stderr.

false
filename?: string

Filename of input CSS, uses for source map generation.

'<unknown>'
forceMediaMerge?: boolean

Enables merging of

rules with the same media query by splitted by other rules. The optimisation is unsafe in general, but should work fine in most cases. Use it on your own risk.

Compress true
csso false
logger?: (() => void)

Function to track every step of transformation.

restructure?: boolean

Disable or enable a structure optimisations.

CompressAstro false
csso true
sourceMap?: boolean

Generate a source map when true.

false
usage?: Usage

Usage data for advanced optimisations.