{"action":"created","issue":{"url":"https://api.github.com/repos/wangzuo/input-moment/issues/10","repository_url":"https://api.github.com/repos/wangzuo/input-moment","labels_url":"https://api.github.com/repos/wangzuo/input-moment/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/wangzuo/input-moment/issues/10/comments","events_url":"https://api.github.com/repos/wangzuo/input-moment/issues/10/events","html_url":"https://github.com/wangzuo/input-moment/issues/10","id":136750329,"number":10,"title":"Error importing after Babel comp","user":{"login":"ajwagner777","id":881379,"avatar_url":"https://avatars.githubusercontent.com/u/881379?v=3","gravatar_id":"","url":"https://api.github.com/users/ajwagner777","html_url":"https://github.com/ajwagner777","followers_url":"https://api.github.com/users/ajwagner777/followers","following_url":"https://api.github.com/users/ajwagner777/following{/other_user}","gists_url":"https://api.github.com/users/ajwagner777/gists{/gist_id}","starred_url":"https://api.github.com/users/ajwagner777/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajwagner777/subscriptions","organizations_url":"https://api.github.com/users/ajwagner777/orgs","repos_url":"https://api.github.com/users/ajwagner777/repos","events_url":"https://api.github.com/users/ajwagner777/events{/privacy}","received_events_url":"https://api.github.com/users/ajwagner777/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/wangzuo/input-moment/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-26T16:49:38Z","updated_at":"2016-04-15T08:35:18Z","closed_at":null,"body":"Sorry in advance for the noob question.\r\n\r\nI am importing input moment, like so:\r\n\r\n`import InputMoment from \"input-moment\"`\r\n\r\nHowever, after babel compiles I get a `Uncaught ReferenceError: moment is not defined`\r\n\r\nI have Moment included in the project already (we're using it elsewhere).  Any thoughts on what I might be doing wrong?"},"comment":{"url":"https://api.github.com/repos/wangzuo/input-moment/issues/comments/210360381","html_url":"https://github.com/wangzuo/input-moment/issues/10#issuecomment-210360381","issue_url":"https://api.github.com/repos/wangzuo/input-moment/issues/10","id":210360381,"user":{"login":"ericluwj","id":1736023,"avatar_url":"https://avatars.githubusercontent.com/u/1736023?v=3","gravatar_id":"","url":"https://api.github.com/users/ericluwj","html_url":"https://github.com/ericluwj","followers_url":"https://api.github.com/users/ericluwj/followers","following_url":"https://api.github.com/users/ericluwj/following{/other_user}","gists_url":"https://api.github.com/users/ericluwj/gists{/gist_id}","starred_url":"https://api.github.com/users/ericluwj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericluwj/subscriptions","organizations_url":"https://api.github.com/users/ericluwj/orgs","repos_url":"https://api.github.com/users/ericluwj/repos","events_url":"https://api.github.com/users/ericluwj/events{/privacy}","received_events_url":"https://api.github.com/users/ericluwj/received_events","type":"User","site_admin":false},"created_at":"2016-04-15T08:35:18Z","updated_at":"2016-04-15T08:35:18Z","body":"@ajwagner777 There is a way to overcome this issue by using [imports-loader](https://github.com/webpack/imports-loader).\r\n\r\nUse the following import statement instead:\r\n`import InputMoment from 'imports?moment,React=react,ReactDOM=react-dom!input-moment/dist/input-moment';`\r\n\r\nJust ensure that the libraries (moment, react, react-dom, imports-loader) are installed."}}