KC's Workspace
    Preparing search index...
    interface LibraryOptions {
        cssFileName?: string;
        entry: string | Record<string, string> | string[];
        fileName?:
            | string
            | (
                (
                    format: "es" | "iife" | "module" | "commonjs" | "cjs" | "esm" | "umd",
                    entryName: string,
                ) => string
            );
        formats?: LibraryFormats[];
        name?: string;
    }
    Index

    Properties

    cssFileName?: string

    The name of the CSS file output if the library imports CSS. Defaults to the same value as build.lib.fileName if it's set a string, otherwise it falls back to the name option of the project package.json.

    entry

    entry: string | Record<string, string> | string[]

    Path of library entry

    fileName?:
        | string
        | (
            (
                format: "es" | "iife" | "module" | "commonjs" | "cjs" | "esm" | "umd",
                entryName: string,
            ) => string
        )

    The name of the package file output. The default file name is the name option of the project package.json. It can also be defined as a function taking the format as an argument.

    formats?: LibraryFormats[]

    Output bundle formats

    ['es', 'umd']
    
    name?: string

    The name of the exposed global variable. Required when the formats option includes umd or iife