Vite plugin to add license banners to bundled output. Current stable version is 0.0.2 (November 2025), released on a cadence of roughly every 7 months. It is a thin wrapper around rollup-plugin-license that resolves compatibility issues with Vite's build pipeline. Key differentiators: seamless integration with Vite's configuration and plugin system; supports customizable banner comment style and content from file or inline; includes TypeScript type definitions. Compared to using rollup-plugin-license directly, this plugin handles Vite-specific nuances such as virtual module IDs and hooks.
npm install vite-plugin-licenseVerified import paths — ran on the pinned version, not inferred.
Creates a Vite config with license plugin that adds a banner from LICENCE file.
Upgrade vite to ^7.1.12 or later.
Replace rollup-plugin-license with vite-plugin-license.
Use 'import license from 'vite-plugin-license''.
Run 'npm install vite-plugin-license' and ensure tsconfig includes 'moduleResolution': 'node' or 'bundler'.
Change to 'import license from 'vite-plugin-license''.
Upgrade Vite: 'npm install vite@^7.1.12'.