Rollup plugin to remove banner comments (e.g., license headers) from module files before bundling. Current stable version is 3.1.0, released with support for Rollup 4.x. Released irregularly, with major version bumps aligning with Rollup peer dependency updates. Key differentiator: lightweight, focused solely on banner stripping without additional transforms. Alternatives like rollup-plugin-terser or manual regex require more configuration. Ships TypeScript types.
npm install rollup-plugin-strip-bannerVerified import paths — ran on the pinned version, not inferred.
Configures rollup-plugin-strip-banner in a Rollup config file with include/exclude patterns.
Use rollup-plugin-strip-banner at your own risk or implement a simple plugin that removes banner comments via regex or AST.
Upgrade Node to version 14 or later.
Use Rollup >=2 and Node >=10.
Ensure banners are at the top of the module before you trust stripping; consider verifying output.
Upgrade to >=1.0.0 to avoid sourcemap issues.
npm install rollup-plugin-strip-banner --save-dev
Use import stripBanner from 'rollup-plugin-strip-banner' (default import) instead of import { stripBanner } from 'rollup-plugin-strip-banner' (named import).Ensure include/exclude follow minimatch glob patterns; exclude overrides include. Use absolute or relative paths correctly.