build-hash-webpack-plugin

1.0.4 • Public • Published

build-hash-webpack-plugin

License: MIT

NPM

Webpack plugin that emits a json file contaning the build hash.

Why Is This Useful?

When working with Webpack you might want to generate your build hash.

This plug-in outputs a json file contaning a single attribute hash wich is the build hash.

Example output:

The output is a JSON object in the form:

{"hash":"68aaedf27867fc4cb95d"}

Install

yarn add -D build-hash-webpack-plugin

Configuration

In your webpack config include the plug-in. And add it to your config:

import BuildHashPlugin from 'build-hash-webpack-plugin';
// ...
module.exports = {
    // ....
    plugins: [new BuildHashPlugin()]
}

Options

You can pass the following options:

filename

Optional. build-hash.json by default.

Name for the created json file.

new BuildHashPlugin({filename: 'build-hash.json'})

Readme

Keywords

none

Package Sidebar

Install

npm i build-hash-webpack-plugin

Weekly Downloads

190

Version

1.0.4

License

MIT

Unpacked Size

3.41 kB

Total Files

5

Last publish

Collaborators

  • reda-alaoui