{"action":"created","issue":{"url":"https://api.github.com/repos/phated/gulp-wrap-amd/issues/15","labels_url":"https://api.github.com/repos/phated/gulp-wrap-amd/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/phated/gulp-wrap-amd/issues/15/comments","events_url":"https://api.github.com/repos/phated/gulp-wrap-amd/issues/15/events","html_url":"https://github.com/phated/gulp-wrap-amd/issues/15","id":56890884,"number":15,"title":"support `6to5` ES6 transpiler purposal","user":{"login":"mattma","id":1148428,"avatar_url":"https://avatars.githubusercontent.com/u/1148428?v=3","gravatar_id":"","url":"https://api.github.com/users/mattma","html_url":"https://github.com/mattma","followers_url":"https://api.github.com/users/mattma/followers","following_url":"https://api.github.com/users/mattma/following{/other_user}","gists_url":"https://api.github.com/users/mattma/gists{/gist_id}","starred_url":"https://api.github.com/users/mattma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattma/subscriptions","organizations_url":"https://api.github.com/users/mattma/orgs","repos_url":"https://api.github.com/users/mattma/repos","events_url":"https://api.github.com/users/mattma/events{/privacy}","received_events_url":"https://api.github.com/users/mattma/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-07T01:27:23Z","updated_at":"2015-02-07T01:35:36Z","closed_at":null,"body":"I have been talking with [`6to5`](https://github.com/6to5/6to5) maintainer, @sebmck on `gitter` for one of the issues that I am currently having. \r\n\r\nIn the newer version of `6to5`, it has dropped off the old implementation and using the new one like below,\r\n\r\n```js\r\ndefine(\"rocks/app\", [\"exports\", \"module\", \"ember\"], function (exports, module, _ember) {\r\n    \"use strict\";\r\n    var _interopRequire = function (obj) { return obj && obj.__esModule ? obj[\"default\"] : obj; };\r\n    var Ember = _interopRequire(_ember);\r\n    ....\r\n```\r\n\r\nWhenever user use `import sth from \"sth\"`, it will internally use `_interopRequire` function to figure out using `obj[\"default\"] ` or `obj`. So it is a new behavior existence in the current version of `6to5#v3.0.0` and above. \r\n\r\nThere is an option to use another [module](https://github.com/esperantojs/esperanto), but I would prefer to add `__esModule` property when we build up the `amd` module through `gulp` transformation. \r\n\r\nThe end result would be, every single `imported object` would have an internal property attached to itself, `__esModule`. \r\n\r\nIt would work just fine when conjunct with `6to5` module which do \"ES6\" transpile. \"6to5\" increase its popularity in its space and climb to be the top solution. It would be great to support it. \r\n\r\nI am going to write the logic to support its use case. It should not affect anything else. \r\n"},"comment":{"url":"https://api.github.com/repos/phated/gulp-wrap-amd/issues/comments/73343263","html_url":"https://github.com/phated/gulp-wrap-amd/issues/15#issuecomment-73343263","issue_url":"https://api.github.com/repos/phated/gulp-wrap-amd/issues/15","id":73343263,"user":{"login":"mattma","id":1148428,"avatar_url":"https://avatars.githubusercontent.com/u/1148428?v=3","gravatar_id":"","url":"https://api.github.com/users/mattma","html_url":"https://github.com/mattma","followers_url":"https://api.github.com/users/mattma/followers","following_url":"https://api.github.com/users/mattma/following{/other_user}","gists_url":"https://api.github.com/users/mattma/gists{/gist_id}","starred_url":"https://api.github.com/users/mattma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattma/subscriptions","organizations_url":"https://api.github.com/users/mattma/orgs","repos_url":"https://api.github.com/users/mattma/repos","events_url":"https://api.github.com/users/mattma/events{/privacy}","received_events_url":"https://api.github.com/users/mattma/received_events","type":"User","site_admin":false},"created_at":"2015-02-07T01:35:36Z","updated_at":"2015-02-07T01:35:36Z","body":"The goal is that we could attach the `__esModule` to the object of every import statement. so it would work out of the box without any hacks like [this](https://github.com/mattma/ember-6to5-issue/commit/8990a71657154f1b24fbd3d325c7629d8d8750d4)"}}