interface LibraryOptions {
    entry: InputOption;
    fileName?: string | ((format, entryName) => string);
    formats?: LibraryFormats[];
    name?: string;
}

Properties

Path of library entry

fileName?: string | ((format, entryName) => 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.

Type declaration

    • (format, entryName): string
    • Parameters

      Returns string

formats?: LibraryFormats[]

Output bundle formats

Default

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

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