{"action":"created","issue":{"url":"https://api.github.com/repos/moment/moment/issues/2608","repository_url":"https://api.github.com/repos/moment/moment","labels_url":"https://api.github.com/repos/moment/moment/issues/2608/labels{/name}","comments_url":"https://api.github.com/repos/moment/moment/issues/2608/comments","events_url":"https://api.github.com/repos/moment/moment/issues/2608/events","html_url":"https://github.com/moment/moment/issues/2608","id":106411308,"number":2608,"title":"How can I import momentjs in es6?","user":{"login":"alesch","id":533044,"avatar_url":"https://avatars.githubusercontent.com/u/533044?v=3","gravatar_id":"","url":"https://api.github.com/users/alesch","html_url":"https://github.com/alesch","followers_url":"https://api.github.com/users/alesch/followers","following_url":"https://api.github.com/users/alesch/following{/other_user}","gists_url":"https://api.github.com/users/alesch/gists{/gist_id}","starred_url":"https://api.github.com/users/alesch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alesch/subscriptions","organizations_url":"https://api.github.com/users/alesch/orgs","repos_url":"https://api.github.com/users/alesch/repos","events_url":"https://api.github.com/users/alesch/events{/privacy}","received_events_url":"https://api.github.com/users/alesch/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/moment/moment/labels/Build/Release","name":"Build/Release","color":"009800"},{"url":"https://api.github.com/repos/moment/moment/labels/Loading","name":"Loading","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":65,"created_at":"2015-09-14T19:27:03Z","updated_at":"2016-06-07T07:09:09Z","closed_at":null,"body":"Hi,\r\n\r\nI've tried the following imports in node, to execute `moment.format( date )` but all of them fail with: `format is undefined`.\r\n```javascript\r\nimport moment from 'moment'\r\nimport { moment } from 'moment'\r\nimport * as moment from 'moment'\r\n```\r\n\r\nHow is the correct way of importing this library from es6?\r\n\r\nThanks in advance!"},"comment":{"url":"https://api.github.com/repos/moment/moment/issues/comments/224198242","html_url":"https://github.com/moment/moment/issues/2608#issuecomment-224198242","issue_url":"https://api.github.com/repos/moment/moment/issues/2608","id":224198242,"user":{"login":"mclxly","id":1973671,"avatar_url":"https://avatars.githubusercontent.com/u/1973671?v=3","gravatar_id":"","url":"https://api.github.com/users/mclxly","html_url":"https://github.com/mclxly","followers_url":"https://api.github.com/users/mclxly/followers","following_url":"https://api.github.com/users/mclxly/following{/other_user}","gists_url":"https://api.github.com/users/mclxly/gists{/gist_id}","starred_url":"https://api.github.com/users/mclxly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mclxly/subscriptions","organizations_url":"https://api.github.com/users/mclxly/orgs","repos_url":"https://api.github.com/users/mclxly/repos","events_url":"https://api.github.com/users/mclxly/events{/privacy}","received_events_url":"https://api.github.com/users/mclxly/received_events","type":"User","site_admin":false},"created_at":"2016-06-07T07:09:09Z","updated_at":"2016-06-07T07:09:09Z","body":"Latest version just works in ES6.\r\n\r\n```javascript\r\nimport moment from 'moment';\r\nmoment.locale('zh-CN');\r\n...\r\n<h6>{moment([2007, 0, 29]).fromNow()}</h6>\r\n...\r\n```"}}
{"actor":{"display_login":"mclxly"}}