draft: refactor project so it sits on top of a standalone app
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
'use strict';
|
||||
/* global __resourceQuery WorkerGlobalScope self */
|
||||
// Send messages to the outside, so plugins can consume it.
|
||||
|
||||
function sendMsg(type, data) {
|
||||
if (typeof self !== 'undefined' && (typeof WorkerGlobalScope === 'undefined' || !(self instanceof WorkerGlobalScope))) {
|
||||
self.postMessage({
|
||||
type: "webpack".concat(type),
|
||||
data: data
|
||||
}, '*');
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = sendMsg;
|
||||
Reference in New Issue
Block a user