diff --git a/src/helpers/setUpEdgeFunction.js b/src/helpers/setUpEdgeFunction.js index d035b32a..bb486f8c 100644 --- a/src/helpers/setUpEdgeFunction.js +++ b/src/helpers/setUpEdgeFunction.js @@ -89,7 +89,14 @@ const setUpEdgeFunction = async ({ angularJson, constants, failBuild }) => { // we ensure this is initialised before any other module const polyfills = ` import process from "node:process" + import crypto from "node:crypto" + Object.defineProperty(globalThis, 'crypto', { + configurable: true, + enumerable: true, + value: crypto, + writable: true + }) globalThis.process = process globalThis.DenoEvent = globalThis.Event // storing this for fixup-event.mjs `