{"id":25932781,"url":"https://github.com/cosium/build-hash-webpack-plugin","last_synced_at":"2025-10-16T08:19:10.957Z","repository":{"id":57191172,"uuid":"170708653","full_name":"Cosium/build-hash-webpack-plugin","owner":"Cosium","description":"Webpack plugin that emits a json file contaning the build hash","archived":false,"fork":false,"pushed_at":"2019-02-17T21:26:05.000Z","size":10,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-14T02:11:26.315Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cosium.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-14T14:57:42.000Z","updated_at":"2022-10-27T09:24:27.000Z","dependencies_parsed_at":"2022-09-15T22:23:06.690Z","dependency_job_id":null,"html_url":"https://github.com/Cosium/build-hash-webpack-plugin","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Cosium/build-hash-webpack-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cosium%2Fbuild-hash-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cosium%2Fbuild-hash-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cosium%2Fbuild-hash-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cosium%2Fbuild-hash-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cosium","download_url":"https://codeload.github.com/Cosium/build-hash-webpack-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cosium%2Fbuild-hash-webpack-plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261288183,"owners_count":23136036,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-04T00:39:06.876Z","updated_at":"2025-10-16T08:19:05.908Z","avatar_url":"https://github.com/Cosium.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# build-hash-webpack-plugin\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n[![NPM](https://nodei.co/npm/build-hash-webpack-plugin.png)](https://www.npmjs.com/package/build-hash-webpack-plugin)\n\nWebpack plugin that emits a json file contaning the build hash.\n\n## Why Is This Useful?\n\nFor each build, Webpack generates an in-memory hash allowing to know if two build outputs are the same or not.\n\nThis plug-in outputs a json file contaning this described build hash.\n\nThis can be especially useful when you want to check if a new version of a Single Page Application (SPA) runned by your user's browser is available. The SPA would then, periodically, compare the remote hash with the initial hash and trigger a reload in case of mismatch.\n\n### Example output:\n\nThe output is a JSON object in the form:\n\n```json\n{\"hash\":\"68aaedf27867fc4cb95d\"}\n```\n\n## Install\n\n```sh\nyarn add -D build-hash-webpack-plugin\n```\n\n## Configuration\n\nIn your webpack config include the plug-in. And add it to your config:\n\n```js\nimport BuildHashPlugin from 'build-hash-webpack-plugin';\n// ...\nmodule.exports = {\n    // ....\n    plugins: [new BuildHashPlugin()]\n}\n```\n\n### Options\n\nYou can pass the following options:\n\n#### `filename`\n\nOptional. `build-hash.json` by default.\n\nName for the created json file.\n\n```js\nnew BuildHashPlugin({filename: 'build-hash.json'})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcosium%2Fbuild-hash-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcosium%2Fbuild-hash-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcosium%2Fbuild-hash-webpack-plugin/lists"}