{"action":"created","issue":{"url":"https://api.github.com/repos/ember-cli/loader.js/issues/91","repository_url":"https://api.github.com/repos/ember-cli/loader.js","labels_url":"https://api.github.com/repos/ember-cli/loader.js/issues/91/labels{/name}","comments_url":"https://api.github.com/repos/ember-cli/loader.js/issues/91/comments","events_url":"https://api.github.com/repos/ember-cli/loader.js/issues/91/events","html_url":"https://github.com/ember-cli/loader.js/issues/91","id":168164521,"number":91,"title":"loader.js should not modify export objects","user":{"login":"eventualbuddha","id":1938,"avatar_url":"https://avatars.githubusercontent.com/u/1938?v=3","gravatar_id":"","url":"https://api.github.com/users/eventualbuddha","html_url":"https://github.com/eventualbuddha","followers_url":"https://api.github.com/users/eventualbuddha/followers","following_url":"https://api.github.com/users/eventualbuddha/following{/other_user}","gists_url":"https://api.github.com/users/eventualbuddha/gists{/gist_id}","starred_url":"https://api.github.com/users/eventualbuddha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eventualbuddha/subscriptions","organizations_url":"https://api.github.com/users/eventualbuddha/orgs","repos_url":"https://api.github.com/users/eventualbuddha/repos","events_url":"https://api.github.com/users/eventualbuddha/events{/privacy}","received_events_url":"https://api.github.com/users/eventualbuddha/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-28T18:29:55Z","updated_at":"2016-07-28T22:57:14Z","closed_at":null,"body":"Currently, loader.js [adds a `default` property to exported objects](https://github.com/ember-cli/loader.js/blob/62b7ec8c57e17a6176e5a79cd601ababf8f47b31/lib/loader/loader.js#L103-L106):\r\n\r\n```js\r\n  Module.prototype.makeDefaultExport = function() {\r\n    var exports = this.module.exports;\r\n    if (exports !== null &&\r\n        (typeof exports === 'object' || typeof exports === 'function') &&\r\n          exports['default'] === undefined) {\r\n      exports['default'] = exports;\r\n    }\r\n  };\r\n```\r\n\r\nDefining a module like so causes an exception when the module is loaded:\r\n\r\n```js\r\ndefine(['module'], function(module) {\r\n  module.exports = Object.freeze({});\r\n});\r\n```\r\n\r\nThis could be addressed by specifically looking for frozen objects, but really it seems to me this is an attempt at interop with ES6 modules that is being done poorly."},"comment":{"url":"https://api.github.com/repos/ember-cli/loader.js/issues/comments/236049628","html_url":"https://github.com/ember-cli/loader.js/issues/91#issuecomment-236049628","issue_url":"https://api.github.com/repos/ember-cli/loader.js/issues/91","id":236049628,"user":{"login":"stefanpenner","id":1377,"avatar_url":"https://avatars.githubusercontent.com/u/1377?v=3","gravatar_id":"","url":"https://api.github.com/users/stefanpenner","html_url":"https://github.com/stefanpenner","followers_url":"https://api.github.com/users/stefanpenner/followers","following_url":"https://api.github.com/users/stefanpenner/following{/other_user}","gists_url":"https://api.github.com/users/stefanpenner/gists{/gist_id}","starred_url":"https://api.github.com/users/stefanpenner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefanpenner/subscriptions","organizations_url":"https://api.github.com/users/stefanpenner/orgs","repos_url":"https://api.github.com/users/stefanpenner/repos","events_url":"https://api.github.com/users/stefanpenner/events{/privacy}","received_events_url":"https://api.github.com/users/stefanpenner/received_events","type":"User","site_admin":false},"created_at":"2016-07-28T22:57:13Z","updated_at":"2016-07-28T22:57:13Z","body":"@eventualbuddha i would also be interesting in hearing a proposal for moving forward.. Although I suspect that will be abit more work."}}
{"actor":{"display_login":"stefanpenner"}}