webpack-fingerprint-json
v0.1.0
Published
Write a json file when build is done
Downloads
6
Readme
Webpack Fingerprint Plugin
Writes a JSON file with build metadata
Based on Webpack Fingerprint but without traversing package dependencies
$ npm install --save webpack-fingerprint-json
Examples
Basic
const WebpackFingerprint = require("webpack-fingerprint-json");
module.exports = {
plugins: [
new WebpackFingerprint({
filename: "fingerprint.json" // Default
})
]
}
Will produce a file called fingerprint.json
with following info:
{
"date": "2017-09-17T15:56:50.468Z",
}
Custom information
You can provide additional information to also be stored in the resulting file. To do so, add additional fields to the configuration object.
const WebpackFingerprint = require("webpack-fingerprint-json");
module.exports = {
plugins: [
new WebpackFingerprint({
json: {
build_number: process.env.CI_BUILD_NUMBER,
},
})
]
}