Webpack plugin that automatically injects version from package.json into bundle files as a comment block, replaces custom tags (e.g., [AIV]{version}[/AIV]) in HTML/CSS/JS, and optionally auto-increments the package version via webpack env flags (--env.major, --env.minor, --env.patch). Current stable version 1.2.2. Simple configuration with sensible defaults, all features enabled out of the box. Supports customization of comment format, date format, and tag regex. Limited maintenance; no major updates since 2019.
npm install webpack-auto-inject-versionVerified import paths — ran on the pinned version, not inferred.
Configures webpack-auto-inject-version plugin in webpack.config.js with all options, injecting version as comment and replacing [AIV] tags.
Set runInWatchMode to false (default) to avoid unintended version bumps during development.
Consider migrating to alternative plugins like 'webpack-version-plugin' or use webpack.DefinePlugin with process.env.npm_package_version.
Set PACKAGE_JSON_INDENT to match your package.json indent (usually 2) to avoid unwanted changes.
Run 'npm install webpack-auto-inject-version --save-dev' and use require('webpack-auto-inject-version').