KC's Workspace
    Preparing search index...

    Interface BundleAsyncOptions<C>

    interface BundleAsyncOptions<C extends CustomAtRules> {
        analyzeDependencies?: boolean | DependencyOptions;
        cssModules?: boolean | CSSModulesConfig;
        customAtRules?: C;
        drafts?: Drafts;
        errorRecovery?: boolean;
        exclude?: number;
        filename: string;
        include?: number;
        inputSourceMap?: string;
        minify?: boolean;
        nonStandard?: NonStandard;
        projectRoot?: string;
        pseudoClasses?: PseudoClasses;
        resolver?: Resolver;
        sourceMap?: boolean;
        targets?: Targets;
        unusedSymbols?: string[];
        visitor?: Visitor<C>;
    }

    Type Parameters

    Hierarchy (View Summary)

    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?: C

    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.

    filename: string

    The filename being transformed. Used for error messages and source maps.

    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.

    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.

    resolver?: Resolver
    sourceMap?: boolean

    Whether to output a source map.

    targets?: Targets

    The browser targets for the generated code.

    unusedSymbols?: string[]

    A list of class names, ids, and custom identifiers (e.g. @keyframes) that are known to be unused. These will be removed during minification. Note that these are not selectors but individual names (without any . or # prefixes).

    visitor?: Visitor<C>

    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.