{"action":"closed","issue":{"url":"https://api.github.com/repos/i18next/i18next-express-middleware/issues/37","repository_url":"https://api.github.com/repos/i18next/i18next-express-middleware","labels_url":"https://api.github.com/repos/i18next/i18next-express-middleware/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/i18next/i18next-express-middleware/issues/37/comments","events_url":"https://api.github.com/repos/i18next/i18next-express-middleware/issues/37/events","html_url":"https://github.com/i18next/i18next-express-middleware/issues/37","id":141290398,"number":37,"title":"ES6 imports not working quite right","user":{"login":"bkbrooks","id":2489337,"avatar_url":"https://avatars.githubusercontent.com/u/2489337?v=3","gravatar_id":"","url":"https://api.github.com/users/bkbrooks","html_url":"https://github.com/bkbrooks","followers_url":"https://api.github.com/users/bkbrooks/followers","following_url":"https://api.github.com/users/bkbrooks/following{/other_user}","gists_url":"https://api.github.com/users/bkbrooks/gists{/gist_id}","starred_url":"https://api.github.com/users/bkbrooks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkbrooks/subscriptions","organizations_url":"https://api.github.com/users/bkbrooks/orgs","repos_url":"https://api.github.com/users/bkbrooks/repos","events_url":"https://api.github.com/users/bkbrooks/events{/privacy}","received_events_url":"https://api.github.com/users/bkbrooks/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-03-16T14:24:42Z","updated_at":"2016-03-23T07:45:05Z","closed_at":"2016-03-23T07:45:05Z","body":"Hello,\r\n\r\nI've been experiencing an issue when trying to import the express middleware in my project. \r\n\r\nThis works totally fine:\r\n```\r\nvar middleware = require('i18next-express-middleware')\r\napp.use(middleware.handle(i18n))\r\n```\r\n\r\nThis works fine too:\r\n```\r\nimport { LanguageDetector } from 'i18next-express-middleware'\r\n\r\ni18n\r\n  .use(Backend)\r\n  .use(LanguageDetector)\r\n  .init({})\r\n```\r\n\r\nHowever if I import the whole package with ES6, it breaks. \r\n```\r\nimport middleware from 'i18next-express-middleware'\r\napp.use(middleware.handle(i18n))\r\n```\r\n\r\nI get the error: \r\n```\r\napp.use(_i18nextExpressMiddleware2.default.handle(_i18n2.default));                                          \r\nTypeError: Cannot read property 'handle' of undefined\r\n```"}}