{"action":"created","issue":{"url":"https://api.github.com/repos/jspm/jspm-cli/issues/884","labels_url":"https://api.github.com/repos/jspm/jspm-cli/issues/884/labels{/name}","comments_url":"https://api.github.com/repos/jspm/jspm-cli/issues/884/comments","events_url":"https://api.github.com/repos/jspm/jspm-cli/issues/884/events","html_url":"https://github.com/jspm/jspm-cli/issues/884","id":91404341,"number":884,"title":"bundling fails when es6 specific features of babel are blacklisted","user":{"login":"awalGarg","id":9100409,"avatar_url":"https://avatars.githubusercontent.com/u/9100409?v=3","gravatar_id":"","url":"https://api.github.com/users/awalGarg","html_url":"https://github.com/awalGarg","followers_url":"https://api.github.com/users/awalGarg/followers","following_url":"https://api.github.com/users/awalGarg/following{/other_user}","gists_url":"https://api.github.com/users/awalGarg/gists{/gist_id}","starred_url":"https://api.github.com/users/awalGarg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awalGarg/subscriptions","organizations_url":"https://api.github.com/users/awalGarg/orgs","repos_url":"https://api.github.com/users/awalGarg/repos","events_url":"https://api.github.com/users/awalGarg/events{/privacy}","received_events_url":"https://api.github.com/users/awalGarg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-27T02:43:30Z","updated_at":"2015-06-28T18:41:03Z","closed_at":null,"body":"I couldn't find this reported previously so I am opening a new issue.\r\n\r\nCore issue: Disabling es6 syntax specific flags in babel like adding `\"es6.arrowFunctions\"` to babel blacklist in config.js, and using arrow functions causes bundling (`bundle-sfx` atleast) to fail, throwing an error \"unexpected token\" to stderr, aborting the process.\r\n\r\nExpected: bundling should be allowed with es6 specific syntax in output as well.\r\n\r\nPractical use-cases: I know bundling is intended to be for production where you ideally won't want any es6 specific syntax but there are two cases where this could be very useful:\r\n\r\n1. Internal/personal apps where the overhead of runtime bundling is not acceptable. For instance, ES6 generators use es6 specific syntax and they are supported in both firefox and chrome since long for now. Same with `let` and `const`.\r\n\r\n2. When development is happening in Firefox: Presently, when using runtime bundling, sourcemaps don't work with the Firefox debugger (because of the way scripts are evaled). The debugger just can't open the script url anymore. OTOH, Firefox has the widest ES6 support right now among all browsers with stuff like default parameters, short object notation and much much more. For projects of sufficient complexity, using the native syntax features can drastically decrease build time. We can watch files for changes and do `bundle-sfx ...` without minify with most of the es6 parts FF supports disabled, which can be a great workflow, IMO.\r\n\r\nI hope that makes sense :)\r\nThanks! <3"},"comment":{"url":"https://api.github.com/repos/jspm/jspm-cli/issues/comments/116312502","html_url":"https://github.com/jspm/jspm-cli/issues/884#issuecomment-116312502","issue_url":"https://api.github.com/repos/jspm/jspm-cli/issues/884","id":116312502,"user":{"login":"awalGarg","id":9100409,"avatar_url":"https://avatars.githubusercontent.com/u/9100409?v=3","gravatar_id":"","url":"https://api.github.com/users/awalGarg","html_url":"https://github.com/awalGarg","followers_url":"https://api.github.com/users/awalGarg/followers","following_url":"https://api.github.com/users/awalGarg/following{/other_user}","gists_url":"https://api.github.com/users/awalGarg/gists{/gist_id}","starred_url":"https://api.github.com/users/awalGarg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awalGarg/subscriptions","organizations_url":"https://api.github.com/users/awalGarg/orgs","repos_url":"https://api.github.com/users/awalGarg/repos","events_url":"https://api.github.com/users/awalGarg/events{/privacy}","received_events_url":"https://api.github.com/users/awalGarg/received_events","type":"User","site_admin":false},"created_at":"2015-06-28T18:41:03Z","updated_at":"2015-06-28T18:41:03Z","body":"Thanks for replying @guybedford\r\n\r\nI have set up a gist demonstrating the issue at https://gist.github.com/awalGarg/aecfe13b7188e397bf78\r\n\r\nHope that helps :)"}}