astro-compress - v2.3.7
    Preparing search index...
    interface Interface {
        analyzeDependencies?: boolean | DependencyOptions;
        cssModules?: boolean | CSSModulesConfig;
        customAtRules?: CustomAtRules;
        drafts?: Drafts;
        errorRecovery?: boolean;
        exclude?: number;
        include?: number;
        inputSourceMap?: string;
        minify?: boolean;
        nonStandard?: NonStandard;
        projectRoot?: string;
        pseudoClasses?: PseudoClasses;
        sourceMap?: boolean;
        targets?: Targets;
        unusedSymbols?: string[];
        visitor?: Visitor<CustomAtRules>;
    }

    Hierarchy

    • Omit<TransformOptions<CustomAtRules>, "filename" | "code" | "unusedSymbols">
      • Interface
    Index

    Properties

    analyzeDependencies?: boolean | DependencyOptions

    Whether to analyze dependencies (e.g. @import and url()). When enabled, @import rules are removed, and url() dependencies are replaced with hashed placeholders that can be replaced with the final urls later (after bundling). Dependencies are returned as part of the result.

    cssModules?: boolean | CSSModulesConfig

    Whether to compile this file as a CSS module.

    customAtRules?: CustomAtRules

    Defines how to parse custom CSS at-rules. Each at-rule can have a prelude, defined using a CSS syntax string, and a block body. The body can be a declaration list, rule list, or style block as defined in the css spec.

    drafts?: Drafts

    Whether to enable parsing various draft syntax.

    errorRecovery?: boolean

    Whether to ignore invalid rules and declarations rather than erroring. When enabled, warnings are returned, and the invalid rule or declaration is omitted from the output code.

    exclude?: number

    Features that should never be compiled, even when unsupported by targets.

    include?: number

    Features that should always be compiled, even when supported by targets.

    inputSourceMap?: string

    An input source map to extend.

    minify?: boolean

    Whether to enable minification

    Compress true
    
    lightningcss false
    
    nonStandard?: NonStandard

    Whether to enable various non-standard syntax.

    projectRoot?: string

    An optional project root path, used as the source root in the output source map. Also used to generate relative paths for sources used in CSS module hashes.

    pseudoClasses?: PseudoClasses

    Replaces user action pseudo classes with class names that can be applied from JavaScript. This is useful for polyfills, for example.

    sourceMap?: boolean

    Whether to output a source map.

    targets?: Targets

    The browser targets for the generated code.

    unusedSymbols?: string[]

    Whether to remove unused selectors or keywords.

    Compress []
    
    lightningcss undefined
    
    visitor?: Visitor<CustomAtRules>

    An AST visitor object. This allows custom transforms or analysis to be implemented in JavaScript. Multiple visitors can be composed into one using the composeVisitors function. For optimal performance, visitors should be as specific as possible about what types of values they care about so that JavaScript has to be called as little as possible.