git-hash-webpack-plugin

1.0.1 • Public • Published

git-hash-webpack-plugin

Add variable to process.env.COMMIT

Install

npm install --save-dev git-hash-webpack-plugin

Usage

const GitHashWebpackPlugin = require("git-hash-webpack-plugin");

module.exports = {
  plugins: [
    new GitHashWebpackPlugin()
  ]
}

// use
console.log(process.env.COMMIT) // commit id


Options

options.len

  • type: number
  • default: 0

control hash length

options.webpack

  • type: object
  • default: null

if webpack version < 5 ; add webpack to option

Package Sidebar

Install

npm i git-hash-webpack-plugin

Weekly Downloads

41

Version

1.0.1

License

MIT

Unpacked Size

4.58 kB

Total Files

6

Last publish

Collaborators

  • alanuuu