Rollup plugin that prepends a banner comment with GIT_TAG and COMMITHASH from the last git commit or tag, along with the repo name, copyright, and compilation date. Current published version is 1.1.0 with no recent updates; appears to be in maintenance mode. Key differentiator: simple, zero-config plugin for adding standard git-based versioning banners to Rollup bundles. Alternatives like rollup-plugin-banner or manual inject plugins offer more flexibility but require more setup.
npm install rollup-plugin-add-git-msgVerified import paths — ran on the pinned version, not inferred.
Shows how to import and configure the plugin in a Rollup config file.
Ensure the build runs inside a git repository. Consider adding a check or using an alternative plugin that throws errors for missing git info.
For production builds, consider using an asynchronous plugin or running git commands outside the build pipeline.
Check compatibility with your Rollup version. For Rollup 3+, you may need to use a more recent alternative like rollup-plugin-banner.
Run `npm install --save-dev rollup-plugin-add-git-msg` and ensure it is listed in your package.json.
Use `import addGitMsg from 'rollup-plugin-add-git-msg';` (no braces) or for CommonJS: `const addGitMsg = require('rollup-plugin-add-git-msg').default;`