{"action":"created","issue":{"url":"https://api.github.com/repos/systemjs/systemjs/issues/457","labels_url":"https://api.github.com/repos/systemjs/systemjs/issues/457/labels{/name}","comments_url":"https://api.github.com/repos/systemjs/systemjs/issues/457/comments","events_url":"https://api.github.com/repos/systemjs/systemjs/issues/457/events","html_url":"https://github.com/systemjs/systemjs/issues/457","id":78965320,"number":457,"title":"System.clone not working","user":{"login":"OliverJAsh","id":921609,"avatar_url":"https://avatars.githubusercontent.com/u/921609?v=3","gravatar_id":"","url":"https://api.github.com/users/OliverJAsh","html_url":"https://github.com/OliverJAsh","followers_url":"https://api.github.com/users/OliverJAsh/followers","following_url":"https://api.github.com/users/OliverJAsh/following{/other_user}","gists_url":"https://api.github.com/users/OliverJAsh/gists{/gist_id}","starred_url":"https://api.github.com/users/OliverJAsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OliverJAsh/subscriptions","organizations_url":"https://api.github.com/users/OliverJAsh/orgs","repos_url":"https://api.github.com/users/OliverJAsh/repos","events_url":"https://api.github.com/users/OliverJAsh/events{/privacy}","received_events_url":"https://api.github.com/users/OliverJAsh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-21T12:02:39Z","updated_at":"2015-05-21T12:14:40Z","closed_at":null,"body":"````\r\nvar x = System.clone();\r\nx.baseURL = 'http://visuals.guim.co.uk/2015/05/results-interactive-test/1432207400012';\r\nx.import('main').then(function(main) { console.log(main); });\r\n```\r\n\r\nThe `main` module contains a `System.register('main', …)`, but `main` is an empty object.\r\n\r\nIf we don't clone System, this doesn't happen—`main` is the correct object. Original System has no config applied."},"comment":{"url":"https://api.github.com/repos/systemjs/systemjs/issues/comments/104252234","html_url":"https://github.com/systemjs/systemjs/issues/457#issuecomment-104252234","issue_url":"https://api.github.com/repos/systemjs/systemjs/issues/457","id":104252234,"user":{"login":"guybedford","id":598730,"avatar_url":"https://avatars.githubusercontent.com/u/598730?v=3","gravatar_id":"","url":"https://api.github.com/users/guybedford","html_url":"https://github.com/guybedford","followers_url":"https://api.github.com/users/guybedford/followers","following_url":"https://api.github.com/users/guybedford/following{/other_user}","gists_url":"https://api.github.com/users/guybedford/gists{/gist_id}","starred_url":"https://api.github.com/users/guybedford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guybedford/subscriptions","organizations_url":"https://api.github.com/users/guybedford/orgs","repos_url":"https://api.github.com/users/guybedford/repos","events_url":"https://api.github.com/users/guybedford/events{/privacy}","received_events_url":"https://api.github.com/users/guybedford/received_events","type":"User","site_admin":false},"created_at":"2015-05-21T12:14:40Z","updated_at":"2015-05-21T12:14:40Z","body":"@OliverJAsh this is actually a restriction of `System.register` - it is registering against the global loader.\r\n\r\nThe thing to do is to reassign the global here to the cloned loader before loading the bundle.\r\n\r\nI'm wondering if we should have `System` always refer to the current loader? The issue is if this is a good idea from a spec point of view."}}