webpack-plugin-hash

1.0.3 • Public • Published

webpack-plugin-hash

A Webpack plugin helps you get the build hash(not a specific file content hash) more easily.

Installation

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

Why

When using Webpack, one thing you may notice is that there's a specific Hash key for each build, and unlike the file hash or chunk hash it changes everytime when you build.

This simple plugin helps you quickly get the build hash with the following code:

// webpack.config.js
const WebpackPluginHash = require('webpack-plugin-hash');

module.exports = {
  ...
  plugins: [
    new WebpackPluginHash({
      callback: (error, hash) => {
        console.log(`Build hash: ${hash}`);
      }
    })
  ]
};

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    10
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    10
  • 1.0.2
    0
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i webpack-plugin-hash

Weekly Downloads

10

Version

1.0.3

License

MIT

Last publish

Collaborators

  • magiccube