mirror of
https://github.com/systemjs/systemjs.git
synced 2026-01-25 14:57:38 +00:00
1 line
530 B
JavaScript
1 line
530 B
JavaScript
!function(t){const n=t.System.constructor.prototype,e=n.instantiate;n.instantiate=function(t,n){if(".wasm"===t.slice(-5))return e.call(this,t,n);const r=this;return fetch(t,{credentials:"same-origin"}).then(function(t){if(!t.ok)throw Error("Fetch error: "+t.status+" "+t.statusText+(n?" loading from "+n:""));return t.text()}).then(function(n){return r.transform.call(this,t,n)}).then(function(n){return(0,eval)(n+"\n//# sourceURL="+t),r.getRegister()})},n.transform=function(t,n){return n}}("undefined"!=typeof self?self:global); |