{"action":"opened","issue":{"url":"https://api.github.com/repos/pcardune/handlebars-loader/issues/115","repository_url":"https://api.github.com/repos/pcardune/handlebars-loader","labels_url":"https://api.github.com/repos/pcardune/handlebars-loader/issues/115/labels{/name}","comments_url":"https://api.github.com/repos/pcardune/handlebars-loader/issues/115/comments","events_url":"https://api.github.com/repos/pcardune/handlebars-loader/issues/115/events","html_url":"https://github.com/pcardune/handlebars-loader/issues/115","id":187839404,"number":115,"title":"Support for ES2015 default exports with Webpack 2 in helpers","user":{"login":"TomOne","id":4357973,"avatar_url":"https://avatars.githubusercontent.com/u/4357973?v=3","gravatar_id":"","url":"https://api.github.com/users/TomOne","html_url":"https://github.com/TomOne","followers_url":"https://api.github.com/users/TomOne/followers","following_url":"https://api.github.com/users/TomOne/following{/other_user}","gists_url":"https://api.github.com/users/TomOne/gists{/gist_id}","starred_url":"https://api.github.com/users/TomOne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomOne/subscriptions","organizations_url":"https://api.github.com/users/TomOne/orgs","repos_url":"https://api.github.com/users/TomOne/repos","events_url":"https://api.github.com/users/TomOne/events{/privacy}","received_events_url":"https://api.github.com/users/TomOne/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-07T21:51:37Z","updated_at":"2016-11-07T21:51:37Z","closed_at":null,"body":"If a helper uses ES2015 default exports with Webpack 2 (2.1.0-beta.25), the following setup fails:\r\n\r\n`.babelrc`:\r\n``` JSON\r\n{\r\n    \"presets\": [\r\n        [\"es2015\", { \"modules\": false }]\r\n    ]\r\n}\r\n```\r\n\r\n`template.handlebars`:\r\n``` Handlebars\r\n{{my-helper}}\r\n```\r\n\r\n`my-helper.js`:\r\n``` JavaScript\r\nexport default function () {\r\n  return 'test'\r\n}\r\n```\r\n\r\nAttempting to to provide a context to the imported template results in this error:\r\n``` JavaScript\r\nimport template from './template.handlebars'\r\n\r\ntemplate({}) // <-- Error __default(...).call is not a function\r\n```\r\n\r\nHowever, if the ES2015 default export is replaced by a CommonJS export, everything works fine:\r\n\r\n`my-helper.js`:\r\n``` JavaScript\r\nmodule.exports = function () {\r\n  return 'test'\r\n}\r\n```\r\n\r\nIt would it be great for handlebars-loader to support ES2015 exports using Webpack 2. Or is this issue caused by Webpack’s loader API?"}}
{"actor":{"display_login":"TomOne"}}