{"action":"opened","issue":{"url":"https://api.github.com/repos/jspm/jspm-cli/issues/786","labels_url":"https://api.github.com/repos/jspm/jspm-cli/issues/786/labels{/name}","comments_url":"https://api.github.com/repos/jspm/jspm-cli/issues/786/comments","events_url":"https://api.github.com/repos/jspm/jspm-cli/issues/786/events","html_url":"https://github.com/jspm/jspm-cli/issues/786","id":79417907,"number":786,"title":"jspm bundle interoperability with other module loaders","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":0,"created_at":"2015-05-22T11:29:57Z","updated_at":"2015-05-22T11:29:57Z","closed_at":null,"body":"At the Guardian, we are migrating our JavaScript projects from RequireJS and [curl](https://github.com/cujojs/curl) to SystemJS. We are currently testing SystemJS on a small proportion of users for all JS on theguardian.com. During this transition phase, we require that all JS can be loaded using any one of the these module loaders: RequireJS, curl, and SystemJS.\r\n\r\nFor the most part, we are OK because all three of these module loaders can interpret AMD modules, which represents the majority of our codebase.\r\n\r\nWe have found great difficulty when adding a [jspm bundle as a dependency](https://github.com/guardian/interactive-es6/blob/8dc4063c61663d1b01654636bba4e2fe0c5d3ebb/harness/boot.js.tpl#L39). This is because bundles are in the \"register\" format (`System.register`), which of course cannot be interpreted by curl or RequireJS. As a work around, [we are polyfilling these environments to use SystemJS](https://github.com/OliverJAsh/polyfill-systemjs/blob/master/src/polyfill-systemjs.js), so that we can successfully load the jspm bundle.\r\n\r\nIn my opinion, the output of jspm bundle should be configurable to support different module loaders. If jspm could bundle to AMD, for example, it could be interpreted by all three of the above module loaders.\r\n\r\nIf I'm developing a library, I might like to author it was a jspm package, but distribute a bundled file of AMD modules for backwards compatibility.\r\n\r\nIn https://github.com/jspm/jspm-cli/issues/75, SFX bundles were decided as the fix to this problem. This does not allow us to export anything, however.\r\n\r\nWhat are your thoughts?"}}