We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83d0859 commit 7382333Copy full SHA for 7382333
src/master/implementation.node.ts
@@ -17,7 +17,12 @@ interface WorkerGlobalScope {
17
removeEventListener(eventName: string, listener: (event: Event) => void): void
18
}
19
20
-declare const __non_webpack_require__: typeof require
+// TODO remove webpack hacks. These hurt the performance for non-web-pack situations
21
+// Webpack hack
22
+declare let __non_webpack_require__: typeof require
23
+const isWebpack = typeof __non_webpack_require__ === "function"
24
+const requireFunction: typeof require = isWebpack ? __non_webpack_require__ : eval("require")
25
+
26
declare const self: WorkerGlobalScope
27
28
type WorkerEventName = "error" | "message"
0 commit comments