{"action":"closed","issue":{"url":"https://api.github.com/repos/esperantojs/esperanto/issues/64","labels_url":"https://api.github.com/repos/esperantojs/esperanto/issues/64/labels{/name}","comments_url":"https://api.github.com/repos/esperantojs/esperanto/issues/64/comments","events_url":"https://api.github.com/repos/esperantojs/esperanto/issues/64/events","html_url":"https://github.com/esperantojs/esperanto/issues/64","id":54836777,"number":64,"title":"Concat shouldn't care about external imports","user":{"login":"lukescott","id":486224,"avatar_url":"https://avatars.githubusercontent.com/u/486224?v=3","gravatar_id":"","url":"https://api.github.com/users/lukescott","html_url":"https://github.com/lukescott","followers_url":"https://api.github.com/users/lukescott/followers","following_url":"https://api.github.com/users/lukescott/following{/other_user}","gists_url":"https://api.github.com/users/lukescott/gists{/gist_id}","starred_url":"https://api.github.com/users/lukescott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukescott/subscriptions","organizations_url":"https://api.github.com/users/lukescott/orgs","repos_url":"https://api.github.com/users/lukescott/repos","events_url":"https://api.github.com/users/lukescott/events{/privacy}","received_events_url":"https://api.github.com/users/lukescott/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/esperantojs/esperanto/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/esperantojs/esperanto/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-01-20T02:35:07Z","updated_at":"2015-04-22T20:05:26Z","closed_at":"2015-04-22T20:05:26Z","body":"I'm exporting a single module with several internal modules. I use lodash as an external import. I use 6to5 to transpile the source after esperanto bundles the modules. The result with umd ends up being something like this:\r\n\r\n```javascript\r\n(function() { // <-- Added by me to keep runtime internal\r\n\"use strict\"; // <-- Added by 6to5\r\n// ES6 runtime goes here...\r\n(function(global, factory) {\r\n// umd code..\r\n}(this, function(_) { // <-- this does not work because of above strict\r\n\"use strict\";\r\n// actual code...\r\n});\r\n}); // <-- Added by me to keep runtime internal\r\n```\r\n\r\nWhat I want to do is this:\r\n\r\n```javascript\r\n(function() { <-- Added by me\r\n\"use strict\";\r\n// ES6 runtime goes here...\r\n// actual code...\r\nreturn index__default; // <-- Added by me\r\n}); // <-- Added by me\r\n```\r\n\r\nThe concat option would work great for this, accept for this:\r\n\r\n```javascript\r\n// This bundle must be self-contained - no imports or exports\r\nif ( bundle.externalModules.length || bundle.entryModule.exports.length ) {\r\n\tthrow new Error( 'bundle.concat() can only be used with bundles that have no imports/exports' );\r\n}\r\n```\r\n\r\nIn this case I know what my external dependencies are, and I'm willing to take care of them myself. I just need a way to bypass that error (which for some reason bailed without any message in gulp...)."}}