esbuild plugin to generate license files for bundled dependencies. Current stable version is 1.2.3. It is actively maintained with regular releases. Key differentiators: generates both a banner for the bundle and a separate third-party license file, uses a template system based on EJS and offers a custom template function. Compared to alternatives like rollup-plugin-license, it is designed specifically for esbuild.
npm install esbuild-plugin-licenseNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows full usage: configure esbuild with the plugin, custom banner, and third-party license output as a text file.
Update template function signature to use the second parameter 'self' for the entry package.
No action needed; output may change if duplicates existed.
Use default import: `import esbuildPluginLicense from 'esbuild-plugin-license'`.
Set `platform: 'node'` and ensure the bundle does not use ESM-only features that break Node CJS interop.
Update template function to accept two parameters: `function(dependencies, self)` and use `self.packageJson` for the entry package.
Replace `import { esbuildPluginLicense }` with `import esbuildPluginLicense`.Provide a function: `template(dependencies) { ... return string; }`.