Skip to content

Commit

Permalink
fix: Module build failed: UnhandledSchemeError: Reading from "node:cr…
Browse files Browse the repository at this point in the history
…ypto" is not handled by plugins
  • Loading branch information
nadilas committed May 31, 2024
1 parent 23a317c commit 30800c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ogre/src/hash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function digest(obj: any, algorithm = "SHA-256"): Promise<string> {
}
} else {
const nodeAlg = algorithm.toLowerCase().replace("-", "");
digest = (await import("node:crypto"))
digest = (await import("crypto"))
.createHash(nodeAlg)
.update(Buffer.from(hashInput))
.digest("hex"); // eslint-disable-line
Expand Down

0 comments on commit 30800c7

Please sign in to comment.