Skip to content

fe-luna/git-revision-html-webpack-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

git-revision-html-webpack-plugin

npm

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>

About

Webpack plugin that generates the latest git commit hash within html meta tag for versioning build.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published