From 81366d2946646282b11a9e0aad674ccc521a6697 Mon Sep 17 00:00:00 2001 From: Ludwig Meysel Date: Thu, 9 Mar 2023 13:49:43 +0100 Subject: [PATCH] Add require/exports to worker scope --- src/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.js b/src/index.js index 4f669d1..4459fc0 100644 --- a/src/index.js +++ b/src/index.js @@ -97,6 +97,8 @@ function Worker(url, options) { }, fetch: self.fetch, importScripts() {}, + require, + exports, }; inside.on('message', e => { if (terminated) return;