diff --git a/dist/system.js b/dist/system.js index f21f1d22..26fe3c89 100644 --- a/dist/system.js +++ b/dist/system.js @@ -146,7 +146,7 @@ global.upgradeSystemLoader = function() { if (output instanceof global.Module) return output; else - return new global.Module(output && output.__module ? output.__module : { __defaultOnly: true, 'default': output }); + return new global.Module(output && output.__module ? (delete output.__module, output) : { __defaultOnly: true, 'default': output }); } }; } diff --git a/dist/system.min.js b/dist/system.min.js index b6825163..f1b10734 100644 --- a/dist/system.min.js +++ b/dist/system.min.js @@ -5,4 +5,4 @@ * MIT License */ -!function(global){global.upgradeSystemLoader=function(){delete global.upgradeSystemLoader,function(){if("undefined"==typeof System)throw"System not defined. Include the `es6-module-loader.js` polyfill before SystemJS.";var e=function(t){if(!(t instanceof Module)){for(var r=[],n=0;nn.length)return 0;for(var a=0;aa[s]}return!0},r=System.normalize;System.versions={},System.normalize=function(n,a,s){var o=System.versions;return Promise.resolve(r.call(this,n,a,s)).then(function(r){var n,a,s,i,u=r.indexOf("@");if(-1==u){for(var l in o)if(i=o[l],"string"==typeof i&&(i=[i]),r.substr(0,l.length)==l&&(s=r.charAt(l.length),!s||"/"==s))return l+"@"+i[i.length-1]+r.substr(l.length);return r}n=r.substr(u+1).split("/")[0];var m;if("^"==n.substr(0,1)&&(n=n.substr(1),m=!0),a=n.match(e),m&&(a[1]>0?(m=n,n=a[0],a=[a[1]]):a[2]>0?(m=n,a=[0,a[2]]):(a=[a[1]],m=!1),n=a.join("."),r=r.substr(0,u+1)+n),!a)return r;var d=r.substr(0,u);if(i=o[d]||[],"string"==typeof i&&(i=[i]),!a[3]||m)for(var f=i.length-1;f>=0;f--){var c=i[f];if(c.substr(0,n.length)==n&&"."==c.charAt(n.length)&&(!m||m&&t(c,m)))return d+"@"+c+r.substr(d.length+n.length+1)}return-1==i.indexOf(n)&&(i.push(n),i.sort(t),o[d]=1==i.length?i[0]:i),r})}}()},function(){if(global.System)global.upgradeSystemLoader();else if("undefined"!=typeof window){var e=document.getElementsByTagName("script"),t=e[e.length-1].src,r=t.substr(0,t.lastIndexOf("/")+1);document.write('')}else{var n=require("es6-module-loader");global.System=n.System,global.Loader=n.Loader,global.Module=n.Module,module.exports=global.System,global.upgradeSystemLoader()}}()}("undefined"!=typeof window?window:global); \ No newline at end of file +!function(global){global.upgradeSystemLoader=function(){delete global.upgradeSystemLoader,function(){if("undefined"==typeof System)throw"System not defined. Include the `es6-module-loader.js` polyfill before SystemJS.";var e=function(t){if(!(t instanceof Module)){for(var r=[],n=0;nn.length)return 0;for(var a=0;aa[s]}return!0},r=System.normalize;System.versions={},System.normalize=function(n,a,s){var o=System.versions;return Promise.resolve(r.call(this,n,a,s)).then(function(r){var n,a,s,i,u=r.indexOf("@");if(-1==u){for(var l in o)if(i=o[l],"string"==typeof i&&(i=[i]),r.substr(0,l.length)==l&&(s=r.charAt(l.length),!s||"/"==s))return l+"@"+i[i.length-1]+r.substr(l.length);return r}n=r.substr(u+1).split("/")[0];var m;if("^"==n.substr(0,1)&&(n=n.substr(1),m=!0),a=n.match(e),m&&(a[1]>0?(m=n,n=a[0],a=[a[1]]):a[2]>0?(m=n,a=[0,a[2]]):(a=[a[1]],m=!1),n=a.join("."),r=r.substr(0,u+1)+n),!a)return r;var d=r.substr(0,u);if(i=o[d]||[],"string"==typeof i&&(i=[i]),!a[3]||m)for(var f=i.length-1;f>=0;f--){var c=i[f];if(c.substr(0,n.length)==n&&"."==c.charAt(n.length)&&(!m||m&&t(c,m)))return d+"@"+c+r.substr(d.length+n.length+1)}return-1==i.indexOf(n)&&(i.push(n),i.sort(t),o[d]=1==i.length?i[0]:i),r})}}()},function(){if(global.System)global.upgradeSystemLoader();else if("undefined"!=typeof window){var e=document.getElementsByTagName("script"),t=e[e.length-1].src,r=t.substr(0,t.lastIndexOf("/")+1);document.write('')}else{var n=require("es6-module-loader");global.System=n.System,global.Loader=n.Loader,global.Module=n.Module,module.exports=global.System,global.upgradeSystemLoader()}}()}("undefined"!=typeof window?window:global); \ No newline at end of file diff --git a/lib/system-formats.js b/lib/system-formats.js index afff00f8..79c8acb1 100644 --- a/lib/system-formats.js +++ b/lib/system-formats.js @@ -81,7 +81,7 @@ if (output instanceof global.Module) return output; else - return new global.Module(output && output.__module ? output.__module : { __defaultOnly: true, 'default': output }); + return new global.Module(output && output.__module ? (delete output.__module, output) : { __defaultOnly: true, 'default': output }); } }; }