UNPKG

402 BJavaScriptView Raw
1'use strict';
2/* global __resourceQuery WorkerGlobalScope self */
3// Send messages to the outside, so plugins can consume it.
4
5function sendMsg(type, data) {
6 if (typeof self !== 'undefined' && (typeof WorkerGlobalScope === 'undefined' || !(self instanceof WorkerGlobalScope))) {
7 self.postMessage({
8 type: "webpack".concat(type),
9 data: data
10 }, '*');
11 }
12}
13
14module.exports = sendMsg;
\No newline at end of file