{"action":"created","issue":{"url":"https://api.github.com/repos/jquery/jquery/issues/3145","repository_url":"https://api.github.com/repos/jquery/jquery","labels_url":"https://api.github.com/repos/jquery/jquery/issues/3145/labels{/name}","comments_url":"https://api.github.com/repos/jquery/jquery/issues/3145/comments","events_url":"https://api.github.com/repos/jquery/jquery/issues/3145/events","html_url":"https://github.com/jquery/jquery/issues/3145","id":158906830,"number":3145,"title":"Add support for JSPM sfx bundles.","user":{"login":"tcorral","id":802081,"avatar_url":"https://avatars.githubusercontent.com/u/802081?v=3","gravatar_id":"","url":"https://api.github.com/users/tcorral","html_url":"https://github.com/tcorral","followers_url":"https://api.github.com/users/tcorral/followers","following_url":"https://api.github.com/users/tcorral/following{/other_user}","gists_url":"https://api.github.com/users/tcorral/gists{/gist_id}","starred_url":"https://api.github.com/users/tcorral/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcorral/subscriptions","organizations_url":"https://api.github.com/users/tcorral/orgs","repos_url":"https://api.github.com/users/tcorral/repos","events_url":"https://api.github.com/users/tcorral/events{/privacy}","received_events_url":"https://api.github.com/users/tcorral/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-06-07T12:08:45Z","updated_at":"2016-06-09T11:35:09Z","closed_at":"2016-06-09T11:35:09Z","body":"Feature Request:\r\n**- Does it require access to jQuery internals?**\r\n  - Yes it does. The problem seems to be in the way jQuery is exported.\r\n\r\n**- Can jQuery itself benefit from the feature?**\r\n  - Yes it does. jQuery can be used in more development and production environments.\r\n\r\n**- Is the feature related to DOM operations?**\r\n  - No.\r\n\r\n**- Is the need already served by a plugin?**\r\n  - No.\r\n\r\n**- Does it change an existing API?**\r\n  - No.\r\n\r\n**- Does it support best practice?**\r\n  - Yes.\r\n\r\n### Description ###\r\nIn my project to create our widget bundles we are using:\r\n- [jspm](http://jspm.io/docs/getting-started.html) - [jspm-cli](https://github.com/jspm/jspm-cli)\r\n\r\nAs they are widgets we want our code as isolated as possible, so we use jspm sfx bundles that you can create using:\r\n```js\r\njspm bundle-sfx scripts/main dist/main.js\r\n```\r\n\r\nThe problem is that if this packages doesn't add a ```define``` or  ```require``` to the global and when jQuery wants to export itself it decides that needs to be on the global.\r\n\r\nOverwriting the jQuery we have in the page we have a lot of issues.\r\n\r\n### Link to test case ###\r\n\r\nhttps://jsfiddle.net/aptm7qxy/1/\r\n\r\n\r\nIf we use Webpack Dev Server it doesn't happens:\r\n\r\nhttps://jsfiddle.net/2xua7b98/\r\n"},"comment":{"url":"https://api.github.com/repos/jquery/jquery/issues/comments/224869676","html_url":"https://github.com/jquery/jquery/issues/3145#issuecomment-224869676","issue_url":"https://api.github.com/repos/jquery/jquery/issues/3145","id":224869676,"user":{"login":"tcorral","id":802081,"avatar_url":"https://avatars.githubusercontent.com/u/802081?v=3","gravatar_id":"","url":"https://api.github.com/users/tcorral","html_url":"https://github.com/tcorral","followers_url":"https://api.github.com/users/tcorral/followers","following_url":"https://api.github.com/users/tcorral/following{/other_user}","gists_url":"https://api.github.com/users/tcorral/gists{/gist_id}","starred_url":"https://api.github.com/users/tcorral/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcorral/subscriptions","organizations_url":"https://api.github.com/users/tcorral/orgs","repos_url":"https://api.github.com/users/tcorral/repos","events_url":"https://api.github.com/users/tcorral/events{/privacy}","received_events_url":"https://api.github.com/users/tcorral/received_events","type":"User","site_admin":false},"created_at":"2016-06-09T11:35:09Z","updated_at":"2016-06-09T11:35:09Z","body":"After discussing that with jspm team, that problem can be solved adding the following snippet of code to the jspm/SystemJS config.\r\n```js\r\nmeta: {\r\n    'npm:jquery@2.2.0/dist/jquery.js': {\r\n      format: 'cjs'\r\n    }\r\n  }\r\n```\r\n\r\nThanks, for your time."}}
{"actor":{"display_login":"tcorral"}}