{"library":"rollup-license-plugin","title":"rollup-license-plugin","description":"Extracts OSS license information from npm packages used in Rollup or Vite builds, generating a bill of materials (JSON, HTML, CSV, etc.). Current stable version is 3.2.1 (March 2026), distributed as ESM-only with TypeScript types. Key differentiators: supports both Rollup and Vite, enforces license policies (fails builds on unacceptable licenses), excludes internal packages, and offers customizable output formats.","language":"javascript","status":"active","last_verified":"Mon Apr 27","install":{"commands":["npm install rollup-license-plugin"],"cli":null},"imports":["import { createRollupLicensePlugin } from 'rollup-license-plugin'","import { createViteLicensePlugin } from 'rollup-license-plugin'","import type { PluginOptions } from 'rollup-license-plugin'","import rollupLicensePlugin from 'rollup-license-plugin'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// rollup.config.js\nimport { createRollupLicensePlugin } from 'rollup-license-plugin';\n\nexport default {\n  input: 'src/index.js',\n  output: { dir: 'dist', format: 'esm' },\n  plugins: [\n    createRollupLicensePlugin({\n      outputFilename: 'thirdPartyNotices.json',\n      // fail on GPL or AGPL licenses\n      unacceptableLicenseTest: (licenseId) => /^(GPL|AGPL)/.test(licenseId),\n      // exclude your own packages\n      excludedPackageTest: (packageName) => packageName === '@mycompany/internal'\n    })\n  ]\n};","lang":"typescript","description":"Configures rollup-license-plugin in a Rollup config to generate a third-party notice JSON and fail the build on GPL/AGPL licenses.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}