fix(worker): wrap polyfill to iife

This commit is contained in:
Pooya Parsa 2020-11-13 18:13:51 +01:00
parent b65cd7862a
commit eaf4603d9c

View File

@ -8,7 +8,7 @@ const module = { exports };
const process = { env: {} };
const global = { process };
const window = global;
const o=Date.now(),t=()=>Date.now()-o;process.hrtime=o=>{const e=Math.floor(.001*(Date.now()-t())),n=.001*t();let a=Math.floor(n)+e,r=Math.floor(n%1*1e9);return o&&(a-=o[0],r-=o[1],r<0&&(a--,r+=1e9)),[a,r]};
(function(){const o=Date.now(),t=()=>Date.now()-o;process.hrtime=o=>{const e=Math.floor(.001*(Date.now()-t())),n=.001*t();let a=Math.floor(n)+e,r=Math.floor(n%1*1e9);return o&&(a-=o[0],r-=o[1],r<0&&(a--,r+=1e9)),[a,r]};})();
`
export const worker: SLSTarget = {