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 ab889c3 commit 2ca97ddCopy full SHA for 2ca97dd
client/index.js
@@ -1,4 +1,4 @@
1
-/* global __resourceQuery */
+/* global __resourceQuery WorkerGlobalScope */
2
var url = require("url");
3
var stripAnsi = require("strip-ansi");
4
var socket = require("./socket");
@@ -47,7 +47,11 @@ function log(level, msg) {
47
48
// Send messages to the outside, so plugins can consume it.
49
function sendMsg(type, data) {
50
- if(typeof self !== "undefined" && self.window) {
+ if(
51
+ typeof self !== "undefined" &&
52
+ (typeof WorkerGlobalScope === "undefined" ||
53
+ !(self instanceof WorkerGlobalScope))
54
+ ) {
55
self.postMessage({
56
type: "webpack" + type,
57
data: data
0 commit comments