You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
402 B

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