• Version 3.4.0
  • Published
  • 356 kB
  • 9 dependencies
  • MIT license


npm i rollup-plugin-license
yarn add rollup-plugin-license
pnpm add rollup-plugin-license


Rollup plugin to add license banner to the final bundle and output third party licenses



function rollupPluginLicense

rollupPluginLicense: (options: Options) => Plugin;


    interface Dependency

    interface Dependency {}
    • Dependency information is derived from the package.json file

    property author

    readonly author: Person | null;
    • Author information.

    property contributors

    readonly contributors: Person[];
    • Dependency Contributes list.

    property description

    readonly description: string | null;
    • Dependency Description.

    property homepage

    readonly homepage: string | null;
    • Repository Public Homepage.

    property license

    readonly license: string | null;
    • SPDX License short ID.

    property licenseText

    readonly licenseText: string | null;
    • Full License file text.

    property maintainers

    readonly maintainers: string[];
    • Dependency Maintainers list.

    property name

    readonly name: string | null;
    • Dependency Name.

    property noticeText

    readonly noticeText: string | null;
    • Full notice file text.

    property private

    readonly private: boolean;
    • If dependency is private.

    property repository

    readonly repository: string | DependencyRepository | null;
    • Dependency Repository Location.

    property text

    text: () => string;
    • Turns the dependency into a formatted string


      formatted dependency license info

    property version

    readonly version: string | null;
    • Dependency Version.

    interface Options

    interface Options {}

      property banner

      banner?: Factory<Banner>;
      • License banner to place at the top of your bundle

      property cwd

      cwd?: string;
      • Current Working Directory process.cwd()

      property debug

      debug?: boolean;
      • Debug mode false

      property sourcemap

      sourcemap?: boolean | string;

        property thirdParty

        thirdParty?: ThirdParty;
        • For third party dependencies. Creates a file containing a summary of all dependencies can be generated automatically

        interface Person

        interface Person {}
        • A person, as described in NPM documentation.

          See Also


        property email

        readonly email: string | null;
        • Person Email.

        property name

        readonly name: string;
        • Person Name.

        property text

        text: () => string;
        • Turns the person into a formatted string


          formatted person info

        property url

        readonly url: string | null;
        • Person URL.

        Type Aliases

        type Banner = string | BannerOptions;

          type CommentStyle

          type CommentStyle = 'regular' | 'ignored' | 'slash' | 'none';

          type ThirdParty

          type ThirdParty = ThirdPartyOutputGeneratorFn | ThirdPartyOptions;

            Package Files (1)

            Dependencies (9)

            Dev Dependencies (27)

            Peer Dependencies (1)


            To add a badge like this badgeto your package's README, use the codes available below.

            You may also use to create a custom badge linking to

            • Markdown
            • HTML
              <a href=""><img src="" alt=""></a>