Skip to content

Commit

Permalink
fix: support uppercase hash algorithms
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasKruckenberg committed Apr 4, 2021
1 parent ba3ec8c commit dbe04a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export default (options?: PluginOptions): Plugin => {

function generateIdentity(source: Buffer, alg: string) {
const hash = createHash(alg).update(source).digest().toString('base64')
return `${alg}-${hash}`
return `${alg.toLowerCase()}-${hash}`
}

function isHtmlAsset(obj: OutputAsset | OutputChunk): obj is OutputAsset {
Expand Down

0 comments on commit dbe04a6

Please sign in to comment.