{"action":"created","issue":{"url":"https://api.github.com/repos/systemjs/systemjs/issues/734","labels_url":"https://api.github.com/repos/systemjs/systemjs/issues/734/labels{/name}","comments_url":"https://api.github.com/repos/systemjs/systemjs/issues/734/comments","events_url":"https://api.github.com/repos/systemjs/systemjs/issues/734/events","html_url":"https://github.com/systemjs/systemjs/issues/734","id":103465583,"number":734,"title":"defaultJSExtensions: true and System.register in pre-transpiled modules","user":{"login":"rj33","id":5356026,"avatar_url":"https://avatars.githubusercontent.com/u/5356026?v=3","gravatar_id":"","url":"https://api.github.com/users/rj33","html_url":"https://github.com/rj33","followers_url":"https://api.github.com/users/rj33/followers","following_url":"https://api.github.com/users/rj33/following{/other_user}","gists_url":"https://api.github.com/users/rj33/gists{/gist_id}","starred_url":"https://api.github.com/users/rj33/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rj33/subscriptions","organizations_url":"https://api.github.com/users/rj33/orgs","repos_url":"https://api.github.com/users/rj33/repos","events_url":"https://api.github.com/users/rj33/events{/privacy}","received_events_url":"https://api.github.com/users/rj33/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-27T09:19:59Z","updated_at":"2015-08-27T13:00:51Z","closed_at":null,"body":"In attempting to update my client side code to the latest version of Systemjs, I manually added .js\r\nextensions to all imports (both System.import and internal es6 module imports) on the assumption that\r\ndefaultJSExtensions: true is something that will go away in the future. However, I wasn't able to get the code working without setting defaultJSExtensions to true even after the manual appending of .js everywhere.\r\n\r\nIt works fine with the manual extensions as long as I also set defaultJSExtensions: true .\r\n\r\nI was a bit confused by this, but I'm guessing this is the result of the pre-transpiling I do before hand which is producing System.register format modules like this:\r\n\r\nSystem.register(\"modules/websockets/websockets\", [\"modules/i18n/i18n.js\"], function (_export) {\r\netc etc\r\n\r\nI'm guessing the lack of .js on the modules/websockets/websockets path is the cause of the issue I see, but wanted to make sure I wasn't missing something else. System.import returns without error , but no dependencies are resolved, and the result returned from the the promise is an empty object.\r\n\r\nIs there a way of running with pre-transpiled modules and turning defaultJSExtensions off, or this method of operation pending future changes to Babel?\r\n\r\nThanks,\r\nRichard."},"comment":{"url":"https://api.github.com/repos/systemjs/systemjs/issues/comments/135416545","html_url":"https://github.com/systemjs/systemjs/issues/734#issuecomment-135416545","issue_url":"https://api.github.com/repos/systemjs/systemjs/issues/734","id":135416545,"user":{"login":"guybedford","id":598730,"avatar_url":"https://avatars.githubusercontent.com/u/598730?v=3","gravatar_id":"","url":"https://api.github.com/users/guybedford","html_url":"https://github.com/guybedford","followers_url":"https://api.github.com/users/guybedford/followers","following_url":"https://api.github.com/users/guybedford/following{/other_user}","gists_url":"https://api.github.com/users/guybedford/gists{/gist_id}","starred_url":"https://api.github.com/users/guybedford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guybedford/subscriptions","organizations_url":"https://api.github.com/users/guybedford/orgs","repos_url":"https://api.github.com/users/guybedford/repos","events_url":"https://api.github.com/users/guybedford/events{/privacy}","received_events_url":"https://api.github.com/users/guybedford/received_events","type":"User","site_admin":false},"created_at":"2015-08-27T13:00:51Z","updated_at":"2015-08-27T13:00:51Z","body":"Your modules should only be built without `.js` extensions if you have\ndefaultJSExtensions: true set at build time.\n\nIf you're running a manual Babel task, try setting the module names\nyourself via the `moduleName` option to include the extension.\n\nOtherwise it is advisable to use SystemJS builder and apply the\n`builder.compile('moduleName')` approach for a single-file build.\n\nThe above should really be a standard gulp-systemjs project if anyone is\ninterested in putting that together.\n\nOn Thu, Aug 27, 2015 at 11:20 AM rj33 <notifications@github.com> wrote:\n\n> In attempting to update my client side code to the latest version of\n> Systemjs, I manually added .js\n> extensions to all imports (both System.import and internal es6 module\n> imports) on the assumption that\n> defaultJSExtensions: true is something that will go away in the future.\n> However, I wasn't able to get the code working without setting\n> defaultJSExtensions to true even after the manual appending of .js\n> everywhere.\n>\n> It works fine with the manual extensions as long as I also set\n> defaultJSExtensions: true .\n>\n> I was a bit confused by this, but I'm guessing this is the result of the\n> pre-transpiling I do before hand which is producing System.register format\n> modules like this:\n>\n> System.register(\"modules/websockets/websockets\", [\"modules/i18n/i18n.js\"],\n> function (_export) {\n> etc etc\n>\n> I'm guessing the lack of .js on the modules/websockets/websockets path is\n> the cause of the issue I see, but wanted to make sure I wasn't missing\n> something else. System.import returns without error , but no dependencies\n> are resolved, and the result returned from the the promise is an empty\n> object.\n>\n> Is there a way of running with pre-transpiled modules and turning\n> defaultJSExtensions off, or this method of operation pending future changes\n> to Babel?\n>\n> Thanks,\n> Richard.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/systemjs/systemjs/issues/734>.\n>\n"}}