git-revision-html-webpack-plugin
v1.0.0
Published
Webpack plugin that generates the latest git commit hash within html meta tag for versioning build
Downloads
2
Readme
git-revision-html-webpack-plugin
Webpack plugin can generate the latest git commit hash within html meta tag, which is helpful when checking whether the deployment meets the expectations. It requires html-webpack-plugin.
Installation
npm install git-revision-html-webpack-plugin --save-dev
Usage
const HtmlWebpackPlugin = require('html-webpack-plugin');
const GitRevisionPlugin = require('git-revision-html-webpack-plugin');
module.exports = {
plugins: [
new HtmlPlugin(),
new GitRevisionPlugin()
]
}
Output:
<html>
<head>
<meta name="git-revision" content="eabf661">
</head>
</html>