Comparing version 6.6.0 to 6.6.1
@@ -0,1 +1,4 @@ | ||
SystemJS 6.6.1 | ||
* IE11 support bug fix (https://github.com/systemjs/systemjs/pull/2247) | ||
SystemJS 6.6.0 | ||
@@ -2,0 +5,0 @@ * Fix autoimport dynamic import conflicts (https://github.com/systemjs/systemjs/pull/2245) |
/* | ||
* SJS 6.6.0 | ||
* SJS 6.6.1 | ||
* Minimal SystemJS Build | ||
@@ -568,3 +568,3 @@ */ | ||
// - https://bugs.webkit.org/show_bug.cgi?id=171566 | ||
if (!url.startsWith(baseOrigin + '/')) | ||
if (url.indexOf(baseOrigin + '/')) | ||
script.crossOrigin = 'anonymous'; | ||
@@ -571,0 +571,0 @@ var integrity = importMap.integrity[url]; |
@@ -1,2 +0,2 @@ | ||
!function(){function e(e,t){return(t||"")+" (SystemJS https://git.io/JvFET#"+e+")"}function t(e,t){if(-1!==e.indexOf("\\")&&(e=e.replace(/\\/g,"/")),"/"===e[0]&&"/"===e[1])return t.slice(0,t.indexOf(":")+1)+e;if("."===e[0]&&("/"===e[1]||"."===e[1]&&("/"===e[2]||2===e.length&&(e+="/"))||1===e.length&&(e+="/"))||"/"===e[0]){var n,r=t.slice(0,t.indexOf(":")+1);if(n="/"===t[r.length+1]?"file:"!==r?(n=t.slice(r.length+2)).slice(n.indexOf("/")+1):t.slice(8):t.slice(r.length+("/"===t[r.length])),"/"===e[0])return t.slice(0,t.length-n.length-1)+e;for(var i=n.slice(0,n.lastIndexOf("/")+1)+e,o=[],c=-1,u=0;i.length>u;u++)-1!==c?"/"===i[u]&&(o.push(i.slice(c,u+1)),c=-1):"."===i[u]?"."!==i[u+1]||"/"!==i[u+2]&&u+2!==i.length?"/"===i[u+1]||u+1===i.length?u+=1:c=u:(o.pop(),u+=2):c=u;return-1!==c&&o.push(i.slice(c)),t.slice(0,t.length-n.length)+o.join("")}}function n(e,n){return t(e,n)||(-1!==e.indexOf(":")?e:t("./"+e,n))}function r(e,n,r,i,o){for(var s in e){var f=t(s,r)||s,l=e[s];if("string"==typeof l){var a=u(i,t(l,r)||l,o);a?n[f]=a:c("W1",s,l)}}}function i(e,t){if(t[e])return e;var n=e.length;do{var r=e.slice(0,n+1);if(r in t)return r}while(-1!==(n=e.lastIndexOf("/",n-1)))}function o(e,t){var n=i(e,t);if(n){var r=t[n];if(null===r)return;if(n.length>=e.length||"/"===r[r.length-1])return r+e.slice(n.length);c("W2",n,r)}}function c(t,n,r){console.warn(e(t,[r,n].join(", ")))}function u(e,t,n){for(var r=e.scopes,c=n&&i(n,r);c;){var u=o(t,r[c]);if(u)return u;c=i(c.slice(0,c.lastIndexOf("/")),r)}return o(t,e.imports)||-1!==t.indexOf(":")&&t}function s(){this[O]={}}function f(t,n,r){var i=t[O][n];if(i)return i;var o=[],c=Object.create(null);E&&Object.defineProperty(c,E,{value:"Module"});var u=Promise.resolve().then((function(){return t.instantiate(n,r)})).then((function(r){if(!r)throw Error(e(2,n));var u=r[1]((function(e,t){i.h=!0;var n=!1;if("object"!=typeof e)e in c&&c[e]===t||(c[e]=t,n=!0);else{for(var r in e)t=e[r],r in c&&c[r]===t||(c[r]=t,n=!0);e.__esModule&&(c.__esModule=e.__esModule)}if(n)for(var u=0;o.length>u;u++){var s=o[u];s&&s(c)}return t}),2===r[1].length?{import:function(e){return t.import(e,n)},meta:t.createContext(n)}:void 0);return i.e=u.execute||function(){},[r[0],u.setters||[]]})),s=u.then((function(e){return Promise.all(e[0].map((function(r,i){var o=e[1][i];return Promise.resolve(t.resolve(r,n)).then((function(e){var r=f(t,e,n);return Promise.resolve(r.I).then((function(){return o&&(r.i.push(o),!r.h&&r.I||o(r.n)),r}))}))}))).then((function(e){i.d=e}),!1)}));return s.catch((function(e){i.e=null,i.er=e})),i=t[O][n]={id:n,i:o,n:c,I:u,L:s,h:!1,d:void 0,e:void 0,er:void 0,E:void 0,C:void 0}}function l(){[].forEach.call(document.querySelectorAll("script"),(function(t){if(!t.sp)if("systemjs-module"===t.type){if(t.sp=!0,!t.src)return;System.import("import:"===t.src.slice(0,7)?t.src.slice(7):n(t.src,a))}else if("systemjs-importmap"===t.type){t.sp=!0;var i=t.src?fetch(t.src).then((function(e){return e.text()})):t.innerHTML;j=j.then((function(){return i})).then((function(i){!function(t,i,o){try{var c=JSON.parse(i)}catch(u){throw Error(e(1))}!function(e,t,i){var o;for(o in e.imports&&r(e.imports,i.imports,t,i,null),e.scopes||{}){var c=n(o,t);r(e.scopes[o],i.scopes[c]||(i.scopes[c]={}),t,i,c)}for(o in e.depcache||{})i.depcache[n(o,t)]=e.depcache[o];for(o in e.integrity||{})i.integrity[n(o,t)]=e.integrity[o]}(c,o,t)}(b,i,t.src||a)}))}}))}var a,h="undefined"!=typeof Symbol,v="undefined"!=typeof self,d="undefined"!=typeof document,p=v?self:global;if(d){var m=document.querySelector("base[href]");m&&(a=m.href)}if(!a&&"undefined"!=typeof location){var g=(a=location.href.split("#")[0].split("?")[0]).lastIndexOf("/");-1!==g&&(a=a.slice(0,g+1))}var y,E=h&&Symbol.toStringTag,O=h?Symbol():"@",w=s.prototype;w.import=function(e,t){var n=this;return Promise.resolve(n.prepareImport()).then((function(){return n.resolve(e,t)})).then((function(e){var t=f(n,e);return t.C||function(e,t){return t.C=function e(t,n,r){if(!r[n.id])return r[n.id]=!0,Promise.resolve(n.L).then((function(){return Promise.all(n.d.map((function(n){return e(t,n,r)})))}))}(e,t,{}).then((function(){return function e(t,n,r){function i(){try{var e=n.e.call(S);if(e)return e=e.then((function(){n.C=n.n,n.E=null}),(function(e){throw n.er=e,n.E=null,e})),n.E=n.E||e;n.C=n.n}catch(t){throw n.er=t,t}finally{n.L=n.I=void 0,n.e=null}}if(!r[n.id]){if(r[n.id]=!0,!n.e){if(n.er)throw n.er;return n.E?n.E:void 0}var o;return n.d.forEach((function(i){try{var c=e(t,i,r);c&&(o=o||[]).push(c)}catch(u){throw n.e=null,n.er=u,u}})),o?Promise.all(o).then(i,(function(e){throw n.e=null,n.er=e,e})):i()}}(e,t,{})})).then((function(){return t.n}))}(n,t)}))},w.createContext=function(e){var t=this;return{url:e,resolve:function(n,r){return Promise.resolve(t.resolve(n,r||e))}}},w.register=function(e,t){y=[e,t]},w.getRegister=function(){var e=y;return y=void 0,e};var S=Object.freeze(Object.create(null));p.System=new s;var x,P,j=Promise.resolve(),b={imports:{},scopes:{},depcache:{},integrity:{}},C=d;if(w.prepareImport=function(e){return(C||e)&&(l(),C=!1),j},d&&(l(),window.addEventListener("DOMContentLoaded",l)),d){window.addEventListener("error",(function(e){L=e.filename,M=e.error}));var I=location.origin}w.createScript=function(e){var t=document.createElement("script");t.async=!0,e.startsWith(I+"/")||(t.crossOrigin="anonymous");var n=b.integrity[e];return n&&(t.integrity=n),t.src=e,t};var L,M,T={},_=w.register;w.register=function(e,t){if(d&&"loading"===document.readyState&&"string"!=typeof e){var n=document.getElementsByTagName("script"),r=n[n.length-1],i=r&&r.src;if(i){x=e;var o=this;P=setTimeout((function(){T[i]=[e,t],o.import(i)}))}}else x=void 0;return _.call(this,e,t)},w.instantiate=function(t,n){var r=T[t];if(r)return delete T[t],r;var i=this;return new Promise((function(r,o){var c=w.createScript(t);c.addEventListener("error",(function(){o(Error(e(3,[t,n].join(", "))))})),c.addEventListener("load",(function(){if(document.head.removeChild(c),L===t)o(M);else{var e=i.getRegister();e&&e[0]===x&&clearTimeout(P),r(e)}})),document.head.appendChild(c)}))},w.resolve=function(n,r){return u(b,t(n,r=r||a)||n,r)||function(t,n){throw Error(e(8,[t,n].join(", ")))}(n,r)};var J=w.instantiate;w.instantiate=function(e,t){var n=b.depcache[e];if(n)for(var r=0;n.length>r;r++)f(this,this.resolve(n[r],e),e);return J.call(this,e,t)},v&&"function"==typeof importScripts&&(w.instantiate=function(e){var t=this;return Promise.resolve().then((function(){return importScripts(e),t.getRegister()}))})}(); | ||
!function(){function e(e,n){return(n||"")+" (SystemJS https://git.io/JvFET#"+e+")"}function n(e,n){if(-1!==e.indexOf("\\")&&(e=e.replace(/\\/g,"/")),"/"===e[0]&&"/"===e[1])return n.slice(0,n.indexOf(":")+1)+e;if("."===e[0]&&("/"===e[1]||"."===e[1]&&("/"===e[2]||2===e.length&&(e+="/"))||1===e.length&&(e+="/"))||"/"===e[0]){var t,r=n.slice(0,n.indexOf(":")+1);if(t="/"===n[r.length+1]?"file:"!==r?(t=n.slice(r.length+2)).slice(t.indexOf("/")+1):n.slice(8):n.slice(r.length+("/"===n[r.length])),"/"===e[0])return n.slice(0,n.length-t.length-1)+e;for(var i=t.slice(0,t.lastIndexOf("/")+1)+e,o=[],c=-1,u=0;i.length>u;u++)-1!==c?"/"===i[u]&&(o.push(i.slice(c,u+1)),c=-1):"."===i[u]?"."!==i[u+1]||"/"!==i[u+2]&&u+2!==i.length?"/"===i[u+1]||u+1===i.length?u+=1:c=u:(o.pop(),u+=2):c=u;return-1!==c&&o.push(i.slice(c)),n.slice(0,n.length-t.length)+o.join("")}}function t(e,t){return n(e,t)||(-1!==e.indexOf(":")?e:n("./"+e,t))}function r(e,t,r,i,o){for(var s in e){var f=n(s,r)||s,l=e[s];if("string"==typeof l){var a=u(i,n(l,r)||l,o);a?t[f]=a:c("W1",s,l)}}}function i(e,n){if(n[e])return e;var t=e.length;do{var r=e.slice(0,t+1);if(r in n)return r}while(-1!==(t=e.lastIndexOf("/",t-1)))}function o(e,n){var t=i(e,n);if(t){var r=n[t];if(null===r)return;if(t.length>=e.length||"/"===r[r.length-1])return r+e.slice(t.length);c("W2",t,r)}}function c(n,t,r){console.warn(e(n,[r,t].join(", ")))}function u(e,n,t){for(var r=e.scopes,c=t&&i(t,r);c;){var u=o(n,r[c]);if(u)return u;c=i(c.slice(0,c.lastIndexOf("/")),r)}return o(n,e.imports)||-1!==n.indexOf(":")&&n}function s(){this[O]={}}function f(n,t,r){var i=n[O][t];if(i)return i;var o=[],c=Object.create(null);E&&Object.defineProperty(c,E,{value:"Module"});var u=Promise.resolve().then((function(){return n.instantiate(t,r)})).then((function(r){if(!r)throw Error(e(2,t));var u=r[1]((function(e,n){i.h=!0;var t=!1;if("object"!=typeof e)e in c&&c[e]===n||(c[e]=n,t=!0);else{for(var r in e)n=e[r],r in c&&c[r]===n||(c[r]=n,t=!0);e.__esModule&&(c.__esModule=e.__esModule)}if(t)for(var u=0;o.length>u;u++){var s=o[u];s&&s(c)}return n}),2===r[1].length?{import:function(e){return n.import(e,t)},meta:n.createContext(t)}:void 0);return i.e=u.execute||function(){},[r[0],u.setters||[]]})),s=u.then((function(e){return Promise.all(e[0].map((function(r,i){var o=e[1][i];return Promise.resolve(n.resolve(r,t)).then((function(e){var r=f(n,e,t);return Promise.resolve(r.I).then((function(){return o&&(r.i.push(o),!r.h&&r.I||o(r.n)),r}))}))}))).then((function(e){i.d=e}),!1)}));return s.catch((function(e){i.e=null,i.er=e})),i=n[O][t]={id:t,i:o,n:c,I:u,L:s,h:!1,d:void 0,e:void 0,er:void 0,E:void 0,C:void 0}}function l(){[].forEach.call(document.querySelectorAll("script"),(function(n){if(!n.sp)if("systemjs-module"===n.type){if(n.sp=!0,!n.src)return;System.import("import:"===n.src.slice(0,7)?n.src.slice(7):t(n.src,a))}else if("systemjs-importmap"===n.type){n.sp=!0;var i=n.src?fetch(n.src).then((function(e){return e.text()})):n.innerHTML;j=j.then((function(){return i})).then((function(i){!function(n,i,o){try{var c=JSON.parse(i)}catch(u){throw Error(e(1))}!function(e,n,i){var o;for(o in e.imports&&r(e.imports,i.imports,n,i,null),e.scopes||{}){var c=t(o,n);r(e.scopes[o],i.scopes[c]||(i.scopes[c]={}),n,i,c)}for(o in e.depcache||{})i.depcache[t(o,n)]=e.depcache[o];for(o in e.integrity||{})i.integrity[t(o,n)]=e.integrity[o]}(c,o,n)}(b,i,n.src||a)}))}}))}var a,h="undefined"!=typeof Symbol,v="undefined"!=typeof self,d="undefined"!=typeof document,p=v?self:global;if(d){var m=document.querySelector("base[href]");m&&(a=m.href)}if(!a&&"undefined"!=typeof location){var g=(a=location.href.split("#")[0].split("?")[0]).lastIndexOf("/");-1!==g&&(a=a.slice(0,g+1))}var y,E=h&&Symbol.toStringTag,O=h?Symbol():"@",w=s.prototype;w.import=function(e,n){var t=this;return Promise.resolve(t.prepareImport()).then((function(){return t.resolve(e,n)})).then((function(e){var n=f(t,e);return n.C||function(e,n){return n.C=function e(n,t,r){if(!r[t.id])return r[t.id]=!0,Promise.resolve(t.L).then((function(){return Promise.all(t.d.map((function(t){return e(n,t,r)})))}))}(e,n,{}).then((function(){return function e(n,t,r){function i(){try{var e=t.e.call(S);if(e)return e=e.then((function(){t.C=t.n,t.E=null}),(function(e){throw t.er=e,t.E=null,e})),t.E=t.E||e;t.C=t.n}catch(n){throw t.er=n,n}finally{t.L=t.I=void 0,t.e=null}}if(!r[t.id]){if(r[t.id]=!0,!t.e){if(t.er)throw t.er;return t.E?t.E:void 0}var o;return t.d.forEach((function(i){try{var c=e(n,i,r);c&&(o=o||[]).push(c)}catch(u){throw t.e=null,t.er=u,u}})),o?Promise.all(o).then(i,(function(e){throw t.e=null,t.er=e,e})):i()}}(e,n,{})})).then((function(){return n.n}))}(t,n)}))},w.createContext=function(e){var n=this;return{url:e,resolve:function(t,r){return Promise.resolve(n.resolve(t,r||e))}}},w.register=function(e,n){y=[e,n]},w.getRegister=function(){var e=y;return y=void 0,e};var S=Object.freeze(Object.create(null));p.System=new s;var x,P,j=Promise.resolve(),b={imports:{},scopes:{},depcache:{},integrity:{}},C=d;if(w.prepareImport=function(e){return(C||e)&&(l(),C=!1),j},d&&(l(),window.addEventListener("DOMContentLoaded",l)),d){window.addEventListener("error",(function(e){L=e.filename,M=e.error}));var I=location.origin}w.createScript=function(e){var n=document.createElement("script");n.async=!0,e.indexOf(I+"/")&&(n.crossOrigin="anonymous");var t=b.integrity[e];return t&&(n.integrity=t),n.src=e,n};var L,M,T={},_=w.register;w.register=function(e,n){if(d&&"loading"===document.readyState&&"string"!=typeof e){var t=document.getElementsByTagName("script"),r=t[t.length-1],i=r&&r.src;if(i){x=e;var o=this;P=setTimeout((function(){T[i]=[e,n],o.import(i)}))}}else x=void 0;return _.call(this,e,n)},w.instantiate=function(n,t){var r=T[n];if(r)return delete T[n],r;var i=this;return new Promise((function(r,o){var c=w.createScript(n);c.addEventListener("error",(function(){o(Error(e(3,[n,t].join(", "))))})),c.addEventListener("load",(function(){if(document.head.removeChild(c),L===n)o(M);else{var e=i.getRegister();e&&e[0]===x&&clearTimeout(P),r(e)}})),document.head.appendChild(c)}))},w.resolve=function(t,r){return u(b,n(t,r=r||a)||t,r)||function(n,t){throw Error(e(8,[n,t].join(", ")))}(t,r)};var J=w.instantiate;w.instantiate=function(e,n){var t=b.depcache[e];if(t)for(var r=0;t.length>r;r++)f(this,this.resolve(t[r],e),e);return J.call(this,e,n)},v&&"function"==typeof importScripts&&(w.instantiate=function(e){var n=this;return Promise.resolve().then((function(){return importScripts(e),n.getRegister()}))})}(); | ||
//# sourceMappingURL=s.min.js.map |
/* | ||
* SystemJS 6.6.0 | ||
* SystemJS 6.6.1 | ||
*/ | ||
@@ -576,3 +576,3 @@ (function () { | ||
// - https://bugs.webkit.org/show_bug.cgi?id=171566 | ||
if (!url.startsWith(baseOrigin + '/')) | ||
if (url.indexOf(baseOrigin + '/')) | ||
script.crossOrigin = 'anonymous'; | ||
@@ -579,0 +579,0 @@ var integrity = importMap.integrity[url]; |
/* | ||
* SystemJS 6.6.0 | ||
* SystemJS 6.6.1 | ||
*/ | ||
!function(){function e(e,t){return(t||"")+" (SystemJS Error#"+e+" https://git.io/JvFET#"+e+")"}function t(e,t){if(-1!==e.indexOf("\\")&&(e=e.replace(/\\/g,"/")),"/"===e[0]&&"/"===e[1])return t.slice(0,t.indexOf(":")+1)+e;if("."===e[0]&&("/"===e[1]||"."===e[1]&&("/"===e[2]||2===e.length&&(e+="/"))||1===e.length&&(e+="/"))||"/"===e[0]){var n,r=t.slice(0,t.indexOf(":")+1);if(n="/"===t[r.length+1]?"file:"!==r?(n=t.slice(r.length+2)).slice(n.indexOf("/")+1):t.slice(8):t.slice(r.length+("/"===t[r.length])),"/"===e[0])return t.slice(0,t.length-n.length-1)+e;for(var i=n.slice(0,n.lastIndexOf("/")+1)+e,o=[],u=-1,c=0;i.length>c;c++)-1!==u?"/"===i[c]&&(o.push(i.slice(u,c+1)),u=-1):"."===i[c]?"."!==i[c+1]||"/"!==i[c+2]&&c+2!==i.length?"/"===i[c+1]||c+1===i.length?c+=1:u=c:(o.pop(),c+=2):u=c;return-1!==u&&o.push(i.slice(u)),t.slice(0,t.length-n.length)+o.join("")}}function n(e,n){return t(e,n)||(-1!==e.indexOf(":")?e:t("./"+e,n))}function r(e,n,r,i,o){for(var s in e){var a=t(s,r)||s,f=e[s];if("string"==typeof f){var l=c(i,t(f,r)||f,o);l?n[a]=l:u("W1",s,f,"bare specifier did not resolve")}}}function i(e,t){if(t[e])return e;var n=e.length;do{var r=e.slice(0,n+1);if(r in t)return r}while(-1!==(n=e.lastIndexOf("/",n-1)))}function o(e,t){var n=i(e,t);if(n){var r=t[n];if(null===r)return;if(n.length>=e.length||"/"===r[r.length-1])return r+e.slice(n.length);u("W2",n,r,"should have a trailing '/'")}}function u(t,n,r,i){console.warn(e(t,"Package target "+i+", resolving target '"+r+"' for "+n))}function c(e,t,n){for(var r=e.scopes,u=n&&i(n,r);u;){var c=o(t,r[u]);if(c)return c;u=i(u.slice(0,u.lastIndexOf("/")),r)}return o(t,e.imports)||-1!==t.indexOf(":")&&t}function s(){this[x]={}}function a(e){return e.id}function f(e,t,n,r){if(e.onload(n,t.id,t.d&&t.d.map(a),!!r),n)throw n}function l(t,n,r){var i=t[x][n];if(i)return i;var o=[],u=Object.create(null);S&&Object.defineProperty(u,S,{value:"Module"});var c=Promise.resolve().then((function(){return t.instantiate(n,r)})).then((function(r){if(!r)throw Error(e(2,"Module "+n+" did not instantiate"));var c=r[1]((function(e,t){i.h=!0;var n=!1;if("object"!=typeof e)e in u&&u[e]===t||(u[e]=t,n=!0);else{for(var r in e)t=e[r],r in u&&u[r]===t||(u[r]=t,n=!0);e.__esModule&&(u.__esModule=e.__esModule)}if(n)for(var c=0;o.length>c;c++){var s=o[c];s&&s(u)}return t}),2===r[1].length?{import:function(e){return t.import(e,n)},meta:t.createContext(n)}:void 0);return i.e=c.execute||function(){},[r[0],c.setters||[]]})),s=(c=c.catch((function(e){f(t,i,e,!0)}))).then((function(e){return Promise.all(e[0].map((function(r,i){var o=e[1][i];return Promise.resolve(t.resolve(r,n)).then((function(e){var r=l(t,e,n);return Promise.resolve(r.I).then((function(){return o&&(r.i.push(o),!r.h&&r.I||o(r.n)),r}))}))}))).then((function(e){i.d=e}),(function(e){f(t,i,e,!1)}))}));return s.catch((function(e){i.e=null,i.er=e})),i=t[x][n]={id:n,i:o,n:u,I:c,L:s,h:!1,d:void 0,e:void 0,er:void 0,E:void 0,C:void 0}}function d(){[].forEach.call(document.querySelectorAll("script"),(function(t){if(!t.sp)if("systemjs-module"===t.type){if(t.sp=!0,!t.src)return;System.import("import:"===t.src.slice(0,7)?t.src.slice(7):n(t.src,h))}else if("systemjs-importmap"===t.type){t.sp=!0;var i=t.src?fetch(t.src).then((function(e){return e.text()})):t.innerHTML;C=C.then((function(){return i})).then((function(i){!function(t,i,o){try{var u=JSON.parse(i)}catch(c){throw Error(e(1,"systemjs-importmap contains invalid JSON"))}!function(e,t,i){var o;for(o in e.imports&&r(e.imports,i.imports,t,i,null),e.scopes||{}){var u=n(o,t);r(e.scopes[o],i.scopes[u]||(i.scopes[u]={}),t,i,u)}for(o in e.depcache||{})i.depcache[n(o,t)]=e.depcache[o];for(o in e.integrity||{})i.integrity[n(o,t)]=e.integrity[o]}(u,o,t)}(I,i,t.src||h)}))}}))}var h,v="undefined"!=typeof Symbol,p="undefined"!=typeof self,m="undefined"!=typeof document,g=p?self:global;if(m){var y=document.querySelector("base[href]");y&&(h=y.href)}if(!h&&"undefined"!=typeof location){var b=(h=location.href.split("#")[0].split("?")[0]).lastIndexOf("/");-1!==b&&(h=h.slice(0,b+1))}var E,S=v&&Symbol.toStringTag,x=v?Symbol():"@",O=s.prototype;O.import=function(e,t){var n=this;return Promise.resolve(n.prepareImport()).then((function(){return n.resolve(e,t)})).then((function(e){var t=l(n,e);return t.C||function(e,t){return t.C=function e(t,n,r){if(!r[n.id])return r[n.id]=!0,Promise.resolve(n.L).then((function(){return Promise.all(n.d.map((function(n){return e(t,n,r)})))}))}(e,t,{}).then((function(){return function e(t,n,r){function i(){try{var e=n.e.call(w);if(e)return e=e.then((function(){n.C=n.n,n.E=null,f(t,n,null,!0)}),(function(e){n.er=e,n.E=null,f(t,n,e,!0)})),n.E=n.E||e;n.C=n.n,f(t,n,null,!0)}catch(r){n.er=r,f(t,n,r,!0)}finally{n.L=n.I=void 0,n.e=null}}if(!r[n.id]){if(r[n.id]=!0,!n.e){if(n.er)throw n.er;return n.E?n.E:void 0}var o;return n.d.forEach((function(i){try{var u=e(t,i,r);u&&(o=o||[]).push(u)}catch(c){n.e=null,n.er=c,f(t,n,c,!1)}})),o?Promise.all(o).then(i,(function(e){n.e=null,n.er=e,f(t,n,e,!1)})):i()}}(e,t,{})})).then((function(){return t.n}))}(n,t)}))},O.createContext=function(e){var t=this;return{url:e,resolve:function(n,r){return Promise.resolve(t.resolve(n,r||e))}}},O.onload=function(){},O.register=function(e,t){E=[e,t]},O.getRegister=function(){var e=E;return E=void 0,e};var w=Object.freeze(Object.create(null));g.System=new s;var j,P,C=Promise.resolve(),I={imports:{},scopes:{},depcache:{},integrity:{}},L=m;if(O.prepareImport=function(e){return(L||e)&&(d(),L=!1),C},m&&(d(),window.addEventListener("DOMContentLoaded",d)),m){window.addEventListener("error",(function(e){T=e.filename,W=e.error}));var M=location.origin}O.createScript=function(e){var t=document.createElement("script");t.async=!0,e.startsWith(M+"/")||(t.crossOrigin="anonymous");var n=I.integrity[e];return n&&(t.integrity=n),t.src=e,t};var T,W,A={},R=O.register;O.register=function(e,t){if(m&&"loading"===document.readyState&&"string"!=typeof e){var n=document.getElementsByTagName("script"),r=n[n.length-1],i=r&&r.src;if(i){j=e;var o=this;P=setTimeout((function(){A[i]=[e,t],o.import(i)}))}}else j=void 0;return R.call(this,e,t)},O.instantiate=function(t,n){var r=A[t];if(r)return delete A[t],r;var i=this;return new Promise((function(r,o){var u=O.createScript(t);u.addEventListener("error",(function(){o(Error(e(3,"Error loading "+t+(n?" from "+n:""))))})),u.addEventListener("load",(function(){if(document.head.removeChild(u),T===t)o(W);else{var e=i.getRegister();e&&e[0]===j&&clearTimeout(P),r(e)}})),document.head.appendChild(u)}))},O.resolve=function(n,r){return c(I,t(n,r=r||h)||n,r)||function(t,n){throw Error(e(8,"Unable to resolve bare specifier '"+t+(n?"' from "+n:"'")))}(n,r)};var _=O.instantiate;O.instantiate=function(e,t){var n=I.depcache[e];if(n)for(var r=0;n.length>r;r++)l(this,this.resolve(n[r],e),e);return _.call(this,e,t)},p&&"function"==typeof importScripts&&(O.instantiate=function(e){var t=this;return Promise.resolve().then((function(){return importScripts(e),t.getRegister()}))}),function(e){function t(t){return!e.hasOwnProperty(t)||!isNaN(t)&&e.length>t||a&&e[t]&&"undefined"!=typeof window&&e[t].parent===window}var n,r,i,o=e.System.constructor.prototype,u=o.import;o.import=function(o,c){return function(){for(var o in n=r=void 0,e)t(o)||(n?r||(r=o):n=o,i=o)}(),u.call(this,o,c)};var c=[[],function(){return{}}],s=o.getRegister;o.getRegister=function(){var o=s.call(this);if(o)return o;var u,a=function(){var o,u=0;for(var c in e)if(!t(c)){if(0===u&&c!==n||1===u&&c!==r)return c;u++,o=c}if(o!==i)return o}();if(!a)return c;try{u=e[a]}catch(f){return c}return[[],function(e){return{execute:function(){e({default:u,__useDefault:!0})}}}]};var a="undefined"!=typeof navigator&&-1!==navigator.userAgent.indexOf("Trident")}("undefined"!=typeof self?self:global),function(t){var n=t.System.constructor.prototype,r=n.instantiate;n.shouldFetch=function(e){var t=e.split("?")[0].split("#")[0];return t.slice(t.lastIndexOf(".")).match(/\.(css|html|json|wasm)$/)},n.fetch=function(e){return fetch(e)},n.instantiate=function(t,n){var i=this;return this.shouldFetch(t)?this.fetch(t).then((function(r){if(!r.ok)throw Error(e(7,r.status+" "+r.statusText+", loading "+t+(n?" from "+n:"")));var o=r.headers.get("content-type");if(!o)throw Error(e(4,'Missing header "Content-Type", loading '+t+(n?" from "+n:"")));if(o.match(/^(text|application)\/(x-)?javascript(;|$)/))return r.text().then((function(e){return(0,eval)(e),i.getRegister()}));if(o.match(/^application\/json(;|$)/))return r.text().then((function(e){return[[],function(t){return{execute:function(){t("default",JSON.parse(e))}}}]}));if(o.match(/^text\/css(;|$)/))return r.text().then((function(e){return[[],function(t){return{execute:function(){var n=new CSSStyleSheet;n.replaceSync(e),t("default",n)}}}]}));if(o.match(/^application\/wasm(;|$)/))return(WebAssembly.compileStreaming?WebAssembly.compileStreaming(r):r.arrayBuffer().then(WebAssembly.compile)).then((function(e){var t=[],n=[],r={};return WebAssembly.Module.imports&&WebAssembly.Module.imports(e).forEach((function(e){var i=e.module;-1===t.indexOf(i)&&(t.push(i),n.push((function(e){r[i]=e})))})),[t,function(t){return{setters:n,execute:function(){return WebAssembly.instantiate(e,r).then((function(e){t(e.exports)}))}}}]}));throw Error(e(4,'Unknown module type "'+o+'"'))})):r.apply(this,arguments)}}("undefined"!=typeof self?self:global);var N="undefined"!=typeof Symbol&&Symbol.toStringTag;O.get=function(e){var t=this[x][e];if(t&&null===t.e&&!t.E)return t.er?null:t.n},O.set=function(t,n){try{new URL(t)}catch(u){console.warn(Error(e("W3",'"'+t+'" is not a valid URL to set in the module registry')))}var r;N&&"Module"===n[N]?r=n:(r=Object.assign(Object.create(null),n),N&&Object.defineProperty(r,N,{value:"Module"}));var i=Promise.resolve(r),o=this[x][t]||(this[x][t]={id:t,i:[],h:!1,d:[],e:null,er:void 0,E:void 0});return!o.e&&!o.E&&(Object.assign(o,{n:r,I:void 0,L:void 0,C:i}),r)},O.has=function(e){return!!this[x][e]},O.delete=function(e){var t=this[x],n=t[e];if(!n||null!==n.e||n.E)return!1;var r=n.i;return n.d&&n.d.forEach((function(e){var t=e.i.indexOf(n);-1!==t&&e.i.splice(t,1)})),delete t[e],function(){var n=t[e];if(!n||!r||null!==n.e||n.E)return!1;r.forEach((function(e){n.i.push(e),e(n.n)})),r=null}};var J="undefined"!=typeof Symbol&&Symbol.iterator;O.entries=function(){var e,t,n=this,r=Object.keys(n[x]),i=0,o={next:function(){for(;void 0!==(t=r[i++])&&void 0===(e=n.get(t)););return{done:void 0===t,value:void 0!==t&&[t,e]}}};return o[J]=function(){return this},o}}(); | ||
!function(){function e(e,t){return(t||"")+" (SystemJS Error#"+e+" https://git.io/JvFET#"+e+")"}function t(e,t){if(-1!==e.indexOf("\\")&&(e=e.replace(/\\/g,"/")),"/"===e[0]&&"/"===e[1])return t.slice(0,t.indexOf(":")+1)+e;if("."===e[0]&&("/"===e[1]||"."===e[1]&&("/"===e[2]||2===e.length&&(e+="/"))||1===e.length&&(e+="/"))||"/"===e[0]){var n,r=t.slice(0,t.indexOf(":")+1);if(n="/"===t[r.length+1]?"file:"!==r?(n=t.slice(r.length+2)).slice(n.indexOf("/")+1):t.slice(8):t.slice(r.length+("/"===t[r.length])),"/"===e[0])return t.slice(0,t.length-n.length-1)+e;for(var i=n.slice(0,n.lastIndexOf("/")+1)+e,o=[],u=-1,c=0;i.length>c;c++)-1!==u?"/"===i[c]&&(o.push(i.slice(u,c+1)),u=-1):"."===i[c]?"."!==i[c+1]||"/"!==i[c+2]&&c+2!==i.length?"/"===i[c+1]||c+1===i.length?c+=1:u=c:(o.pop(),c+=2):u=c;return-1!==u&&o.push(i.slice(u)),t.slice(0,t.length-n.length)+o.join("")}}function n(e,n){return t(e,n)||(-1!==e.indexOf(":")?e:t("./"+e,n))}function r(e,n,r,i,o){for(var s in e){var f=t(s,r)||s,a=e[s];if("string"==typeof a){var l=c(i,t(a,r)||a,o);l?n[f]=l:u("W1",s,a,"bare specifier did not resolve")}}}function i(e,t){if(t[e])return e;var n=e.length;do{var r=e.slice(0,n+1);if(r in t)return r}while(-1!==(n=e.lastIndexOf("/",n-1)))}function o(e,t){var n=i(e,t);if(n){var r=t[n];if(null===r)return;if(n.length>=e.length||"/"===r[r.length-1])return r+e.slice(n.length);u("W2",n,r,"should have a trailing '/'")}}function u(t,n,r,i){console.warn(e(t,"Package target "+i+", resolving target '"+r+"' for "+n))}function c(e,t,n){for(var r=e.scopes,u=n&&i(n,r);u;){var c=o(t,r[u]);if(c)return c;u=i(u.slice(0,u.lastIndexOf("/")),r)}return o(t,e.imports)||-1!==t.indexOf(":")&&t}function s(){this[S]={}}function f(e){return e.id}function a(e,t,n,r){if(e.onload(n,t.id,t.d&&t.d.map(f),!!r),n)throw n}function l(t,n,r){var i=t[S][n];if(i)return i;var o=[],u=Object.create(null);x&&Object.defineProperty(u,x,{value:"Module"});var c=Promise.resolve().then((function(){return t.instantiate(n,r)})).then((function(r){if(!r)throw Error(e(2,"Module "+n+" did not instantiate"));var c=r[1]((function(e,t){i.h=!0;var n=!1;if("object"!=typeof e)e in u&&u[e]===t||(u[e]=t,n=!0);else{for(var r in e)t=e[r],r in u&&u[r]===t||(u[r]=t,n=!0);e.__esModule&&(u.__esModule=e.__esModule)}if(n)for(var c=0;o.length>c;c++){var s=o[c];s&&s(u)}return t}),2===r[1].length?{import:function(e){return t.import(e,n)},meta:t.createContext(n)}:void 0);return i.e=c.execute||function(){},[r[0],c.setters||[]]})),s=(c=c.catch((function(e){a(t,i,e,!0)}))).then((function(e){return Promise.all(e[0].map((function(r,i){var o=e[1][i];return Promise.resolve(t.resolve(r,n)).then((function(e){var r=l(t,e,n);return Promise.resolve(r.I).then((function(){return o&&(r.i.push(o),!r.h&&r.I||o(r.n)),r}))}))}))).then((function(e){i.d=e}),(function(e){a(t,i,e,!1)}))}));return s.catch((function(e){i.e=null,i.er=e})),i=t[S][n]={id:n,i:o,n:u,I:c,L:s,h:!1,d:void 0,e:void 0,er:void 0,E:void 0,C:void 0}}function d(){[].forEach.call(document.querySelectorAll("script"),(function(t){if(!t.sp)if("systemjs-module"===t.type){if(t.sp=!0,!t.src)return;System.import("import:"===t.src.slice(0,7)?t.src.slice(7):n(t.src,h))}else if("systemjs-importmap"===t.type){t.sp=!0;var i=t.src?fetch(t.src).then((function(e){return e.text()})):t.innerHTML;C=C.then((function(){return i})).then((function(i){!function(t,i,o){try{var u=JSON.parse(i)}catch(c){throw Error(e(1,"systemjs-importmap contains invalid JSON"))}!function(e,t,i){var o;for(o in e.imports&&r(e.imports,i.imports,t,i,null),e.scopes||{}){var u=n(o,t);r(e.scopes[o],i.scopes[u]||(i.scopes[u]={}),t,i,u)}for(o in e.depcache||{})i.depcache[n(o,t)]=e.depcache[o];for(o in e.integrity||{})i.integrity[n(o,t)]=e.integrity[o]}(u,o,t)}(I,i,t.src||h)}))}}))}var h,v="undefined"!=typeof Symbol,p="undefined"!=typeof self,m="undefined"!=typeof document,g=p?self:global;if(m){var y=document.querySelector("base[href]");y&&(h=y.href)}if(!h&&"undefined"!=typeof location){var b=(h=location.href.split("#")[0].split("?")[0]).lastIndexOf("/");-1!==b&&(h=h.slice(0,b+1))}var E,x=v&&Symbol.toStringTag,S=v?Symbol():"@",O=s.prototype;O.import=function(e,t){var n=this;return Promise.resolve(n.prepareImport()).then((function(){return n.resolve(e,t)})).then((function(e){var t=l(n,e);return t.C||function(e,t){return t.C=function e(t,n,r){if(!r[n.id])return r[n.id]=!0,Promise.resolve(n.L).then((function(){return Promise.all(n.d.map((function(n){return e(t,n,r)})))}))}(e,t,{}).then((function(){return function e(t,n,r){function i(){try{var e=n.e.call(w);if(e)return e=e.then((function(){n.C=n.n,n.E=null,a(t,n,null,!0)}),(function(e){n.er=e,n.E=null,a(t,n,e,!0)})),n.E=n.E||e;n.C=n.n,a(t,n,null,!0)}catch(r){n.er=r,a(t,n,r,!0)}finally{n.L=n.I=void 0,n.e=null}}if(!r[n.id]){if(r[n.id]=!0,!n.e){if(n.er)throw n.er;return n.E?n.E:void 0}var o;return n.d.forEach((function(i){try{var u=e(t,i,r);u&&(o=o||[]).push(u)}catch(c){n.e=null,n.er=c,a(t,n,c,!1)}})),o?Promise.all(o).then(i,(function(e){n.e=null,n.er=e,a(t,n,e,!1)})):i()}}(e,t,{})})).then((function(){return t.n}))}(n,t)}))},O.createContext=function(e){var t=this;return{url:e,resolve:function(n,r){return Promise.resolve(t.resolve(n,r||e))}}},O.onload=function(){},O.register=function(e,t){E=[e,t]},O.getRegister=function(){var e=E;return E=void 0,e};var w=Object.freeze(Object.create(null));g.System=new s;var j,P,C=Promise.resolve(),I={imports:{},scopes:{},depcache:{},integrity:{}},L=m;if(O.prepareImport=function(e){return(L||e)&&(d(),L=!1),C},m&&(d(),window.addEventListener("DOMContentLoaded",d)),m){window.addEventListener("error",(function(e){T=e.filename,W=e.error}));var M=location.origin}O.createScript=function(e){var t=document.createElement("script");t.async=!0,e.indexOf(M+"/")&&(t.crossOrigin="anonymous");var n=I.integrity[e];return n&&(t.integrity=n),t.src=e,t};var T,W,A={},R=O.register;O.register=function(e,t){if(m&&"loading"===document.readyState&&"string"!=typeof e){var n=document.getElementsByTagName("script"),r=n[n.length-1],i=r&&r.src;if(i){j=e;var o=this;P=setTimeout((function(){A[i]=[e,t],o.import(i)}))}}else j=void 0;return R.call(this,e,t)},O.instantiate=function(t,n){var r=A[t];if(r)return delete A[t],r;var i=this;return new Promise((function(r,o){var u=O.createScript(t);u.addEventListener("error",(function(){o(Error(e(3,"Error loading "+t+(n?" from "+n:""))))})),u.addEventListener("load",(function(){if(document.head.removeChild(u),T===t)o(W);else{var e=i.getRegister();e&&e[0]===j&&clearTimeout(P),r(e)}})),document.head.appendChild(u)}))},O.resolve=function(n,r){return c(I,t(n,r=r||h)||n,r)||function(t,n){throw Error(e(8,"Unable to resolve bare specifier '"+t+(n?"' from "+n:"'")))}(n,r)};var _=O.instantiate;O.instantiate=function(e,t){var n=I.depcache[e];if(n)for(var r=0;n.length>r;r++)l(this,this.resolve(n[r],e),e);return _.call(this,e,t)},p&&"function"==typeof importScripts&&(O.instantiate=function(e){var t=this;return Promise.resolve().then((function(){return importScripts(e),t.getRegister()}))}),function(e){function t(t){return!e.hasOwnProperty(t)||!isNaN(t)&&e.length>t||f&&e[t]&&"undefined"!=typeof window&&e[t].parent===window}var n,r,i,o=e.System.constructor.prototype,u=o.import;o.import=function(o,c){return function(){for(var o in n=r=void 0,e)t(o)||(n?r||(r=o):n=o,i=o)}(),u.call(this,o,c)};var c=[[],function(){return{}}],s=o.getRegister;o.getRegister=function(){var o=s.call(this);if(o)return o;var u,f=function(){var o,u=0;for(var c in e)if(!t(c)){if(0===u&&c!==n||1===u&&c!==r)return c;u++,o=c}if(o!==i)return o}();if(!f)return c;try{u=e[f]}catch(a){return c}return[[],function(e){return{execute:function(){e({default:u,__useDefault:!0})}}}]};var f="undefined"!=typeof navigator&&-1!==navigator.userAgent.indexOf("Trident")}("undefined"!=typeof self?self:global),function(t){var n=t.System.constructor.prototype,r=n.instantiate;n.shouldFetch=function(e){var t=e.split("?")[0].split("#")[0];return t.slice(t.lastIndexOf(".")).match(/\.(css|html|json|wasm)$/)},n.fetch=function(e){return fetch(e)},n.instantiate=function(t,n){var i=this;return this.shouldFetch(t)?this.fetch(t).then((function(r){if(!r.ok)throw Error(e(7,r.status+" "+r.statusText+", loading "+t+(n?" from "+n:"")));var o=r.headers.get("content-type");if(!o)throw Error(e(4,'Missing header "Content-Type", loading '+t+(n?" from "+n:"")));if(o.match(/^(text|application)\/(x-)?javascript(;|$)/))return r.text().then((function(e){return(0,eval)(e),i.getRegister()}));if(o.match(/^application\/json(;|$)/))return r.text().then((function(e){return[[],function(t){return{execute:function(){t("default",JSON.parse(e))}}}]}));if(o.match(/^text\/css(;|$)/))return r.text().then((function(e){return[[],function(t){return{execute:function(){var n=new CSSStyleSheet;n.replaceSync(e),t("default",n)}}}]}));if(o.match(/^application\/wasm(;|$)/))return(WebAssembly.compileStreaming?WebAssembly.compileStreaming(r):r.arrayBuffer().then(WebAssembly.compile)).then((function(e){var t=[],n=[],r={};return WebAssembly.Module.imports&&WebAssembly.Module.imports(e).forEach((function(e){var i=e.module;-1===t.indexOf(i)&&(t.push(i),n.push((function(e){r[i]=e})))})),[t,function(t){return{setters:n,execute:function(){return WebAssembly.instantiate(e,r).then((function(e){t(e.exports)}))}}}]}));throw Error(e(4,'Unknown module type "'+o+'"'))})):r.apply(this,arguments)}}("undefined"!=typeof self?self:global);var N="undefined"!=typeof Symbol&&Symbol.toStringTag;O.get=function(e){var t=this[S][e];if(t&&null===t.e&&!t.E)return t.er?null:t.n},O.set=function(t,n){try{new URL(t)}catch(u){console.warn(Error(e("W3",'"'+t+'" is not a valid URL to set in the module registry')))}var r;N&&"Module"===n[N]?r=n:(r=Object.assign(Object.create(null),n),N&&Object.defineProperty(r,N,{value:"Module"}));var i=Promise.resolve(r),o=this[S][t]||(this[S][t]={id:t,i:[],h:!1,d:[],e:null,er:void 0,E:void 0});return!o.e&&!o.E&&(Object.assign(o,{n:r,I:void 0,L:void 0,C:i}),r)},O.has=function(e){return!!this[S][e]},O.delete=function(e){var t=this[S],n=t[e];if(!n||null!==n.e||n.E)return!1;var r=n.i;return n.d&&n.d.forEach((function(e){var t=e.i.indexOf(n);-1!==t&&e.i.splice(t,1)})),delete t[e],function(){var n=t[e];if(!n||!r||null!==n.e||n.E)return!1;r.forEach((function(e){n.i.push(e),e(n.n)})),r=null}};var J="undefined"!=typeof Symbol&&Symbol.iterator;O.entries=function(){var e,t,n=this,r=Object.keys(n[S]),i=0,o={next:function(){for(;void 0!==(t=r[i++])&&void 0===(e=n.get(t)););return{done:void 0===t,value:void 0!==t&&[t,e]}}};return o[J]=function(){return this},o}}(); | ||
//# sourceMappingURL=system.min.js.map |
{ | ||
"name": "systemjs", | ||
"version": "6.6.0", | ||
"version": "6.6.1", | ||
"main": "dist/system-node.cjs", | ||
@@ -5,0 +5,0 @@ "exports": { |
@@ -8,3 +8,3 @@ # SystemJS | ||
Configurable module loader, running System modules at almost-native speed, and enabling ES module semantics and features such as top-level await, dynamic import, and import maps with full compatibility in older browsers including IE. | ||
Configurable module loader, running System modules at almost-native speed, and enabling ES module semantics and features such as top-level await, dynamic import, and import maps with full compatibility in older browsers including [IE11](#ie11). | ||
@@ -43,7 +43,7 @@ Release Links: | ||
The minimal [2.3KB s.js loader](dist/s.min.js) provides a workflow where code written for production workflows of native ES modules in browsers ([like Rollup code-splitting builds](https://rollupjs.org/guide/en#code-splitting)), can be transpiled to the [System.register module format](docs/system-register.md) to work in older browsers that don't support native modules, including IE11++. | ||
The minimal [2.3KB s.js loader](dist/s.min.js) provides a workflow where code written for production workflows of native ES modules in browsers ([like Rollup code-splitting builds](https://rollupjs.org/guide/en#code-splitting)), can be transpiled to the [System.register module format](docs/system-register.md) to work in older browsers that don't support native modules, including [IE11](#ie11). | ||
Since the ES module semantics such as live bindings, circular references, contextual metadata, dynamic import and top-level await [can all be fully supported this way](docs/system-register.md#semantics), while supporting CSP and cross-origin support, this workflow can be relied upon as a polyfill-like path. | ||
* Support for loading [bare specifier names](docs/import-maps.md) through import maps (formerly package maps, formerly map configuration), loaded via `<script type="systemjs-importmap">` (requires a `fetch` polyfill for eg IE11). | ||
* Support for loading [bare specifier names](docs/import-maps.md) through import maps (formerly package maps, formerly map configuration), loaded via `<script type="systemjs-importmap">`. | ||
* Loads and resolves modules as URLs, throwing for bare specifier names (eg `import 'lodash'`) like the native module loader. | ||
@@ -57,3 +57,3 @@ * Loads System.register modules. | ||
* Support for loading [bare specifier names](docs/import-maps.md) through import maps (formerly package maps, formerly map configuration), loaded via `<script type="systemjs-importmap">` (requires a `fetch` polyfill for eg IE11). | ||
* Support for loading [bare specifier names](docs/import-maps.md) through import maps (formerly package maps, formerly map configuration), loaded via `<script type="systemjs-importmap">`. | ||
* Includes the [global loading extra](#extras) for loading global scripts, useful for loading library dependencies traditionally loaded with script tags. | ||
@@ -185,4 +185,23 @@ * [Tracing hooks](docs/hooks.md#trace-hooks) and [registry deletion API](docs/api.md#registry) for reloading workflows. | ||
#### IE11 Note for External Maps | ||
### IE11 Support | ||
IE11 continues to be fully supported, provided the relevant polyfills are available. | ||
The main required polyfill is a `Promise` polyfill. If using import maps a `fetch` polyfill is also needed. | ||
Both of these can be loaded conditionally using for example using [Bluebird Promises](http://bluebirdjs.com/docs/getting-started.html) and the [GitHub Fetch Polyfill](https://github.github.io/fetch/) over Unpkg: | ||
```html | ||
<script> | ||
if (typeof Promise === 'undefined') | ||
document.write('<script src="https://unpkg.com/bluebird@3.7.2/js/browser/bluebird.core.min.js"><\/script>'); | ||
if (typeof fetch === 'undefined') | ||
document.write('<script src="https://unpkg.com/whatwg-fetch@3.4.1/dist/fetch.umd.js"><\/script>'); | ||
</script> | ||
``` | ||
located _before_ the SystemJS script itself. The above will ensure these polyfills are only fetched for older browsers without `Promise` and `fetch` support. | ||
#### Note on Import Maps Support in IE11 | ||
When using external import maps (those with `src=""` attributes), there is an IE11-specific workaround that might need to be used. Browsers should not make a network request when they see `<script type="systemjs-importmap" src="/importmap.json"></script>` during parsing of the initial HTML page. However, IE11 does so. [Codesandbox demonstration](https://codesandbox.io/s/vibrant-black-xiok4?file=/index.html) | ||
@@ -245,35 +264,2 @@ | ||
## Polyfills for Older Browsers | ||
### Promises | ||
Both builds of SystemJS need Promises in the environment to work, which aren't supported in older browsers like IE11. | ||
Promises can be conditionally polyfilled using, for example, [Bluebird](http://bluebirdjs.com/docs/getting-started.html) (generally the fastest Promise polyfill): | ||
```html | ||
<script> | ||
if (typeof Promise === 'undefined') | ||
document.write('<script src="node_modules/bluebird/js/browser/bluebird.core.js"><\/script>'); | ||
</script> | ||
``` | ||
> Generally `document.write` is not recommended when writing web applications, but for this use case | ||
it works really well and will only apply in older browsers anyway. | ||
### Fetch | ||
To support import maps in the system.js build, a fetch polyfill is need. The [GitHub polyfill](https://github.github.io/fetch/) is recommended: | ||
```html | ||
<script> | ||
if (typeof fetch === 'undefined') | ||
document.write('<script src="node_modules/whatwg-fetch/fetch.js"><\/script>'); | ||
</script> | ||
``` | ||
### Constructable Stylesheets | ||
If using CSS modules, a Constructable Stylesheets polyfill is needed - [see the module types documentation](docs/module-types.md#constructable-style-sheets-polyfill) for further info. | ||
## Contributing to SystemJS | ||
@@ -280,0 +266,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
451151
280