Documentation
    Preparing search index...

    Interface ViteLibConfigOptions

    Options for defineViteLibConfig.

    interface ViteLibConfigOptions {
        entry?: string | Record<string, string> | string[];
        formats?: LibraryFormats[];
    }
    Index

    Optionalentry

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

    Library entrypoints.

    Defaults to the entries derived from the nearest package.json exports via getLibEntryFromExports.

    formats?: LibraryFormats[]

    Output formats for the library build.

    Defaults to DEFAULT_EXPORT_FORMATS (['es', 'cjs']). Pass ['es'] for an ESM-only library, for example when the entrypoints use top-level await, which is invalid in a CommonJS bundle.