{"action":"opened","number":8,"pull_request":{"url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/pulls/8","id":188459111,"html_url":"https://github.com/iamakulov/moment-locales-webpack-plugin/pull/8","diff_url":"https://github.com/iamakulov/moment-locales-webpack-plugin/pull/8.diff","patch_url":"https://github.com/iamakulov/moment-locales-webpack-plugin/pull/8.patch","issue_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/issues/8","number":8,"state":"open","locked":false,"title":"Fix missing locales","user":{"login":"kvas-damian","id":2725894,"avatar_url":"https://avatars2.githubusercontent.com/u/2725894?v=4","gravatar_id":"","url":"https://api.github.com/users/kvas-damian","html_url":"https://github.com/kvas-damian","followers_url":"https://api.github.com/users/kvas-damian/followers","following_url":"https://api.github.com/users/kvas-damian/following{/other_user}","gists_url":"https://api.github.com/users/kvas-damian/gists{/gist_id}","starred_url":"https://api.github.com/users/kvas-damian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvas-damian/subscriptions","organizations_url":"https://api.github.com/users/kvas-damian/orgs","repos_url":"https://api.github.com/users/kvas-damian/repos","events_url":"https://api.github.com/users/kvas-damian/events{/privacy}","received_events_url":"https://api.github.com/users/kvas-damian/received_events","type":"User","site_admin":false},"body":"According to http://momentjs.com/docs/#/i18n/ , I'm using:\r\n`moment.locale('af')`\r\nAfter enabling this plugin moment don't see whitelisted locales on my setup. This PR fixes it:\r\n\r\nMy setup:\r\n```\r\nmoment@2.18.1\r\nmoment-locales-webpack-plugin@1.05\r\nnpm@5.8.0\r\nwebpack@3.11\r\n```\r\n\r\nOriginal moment locales map:\r\n\r\n```\r\n/***/ \"./node_modules/moment/locale recursive ^\\\\.\\\\/.*$\":\r\n/***/ (function(module, exports, __webpack_require__) {\r\n\r\nvar map = {\r\n\t\"./af\": \"./node_modules/moment/locale/af.js\",\r\n\t\"./af.js\": \"./node_modules/moment/locale/af.js\",\r\n\t\"./ar\": \"./node_modules/moment/locale/ar.js\",\r\n\t\"./ar-dz\": \"./node_modules/moment/locale/ar-dz.js\",\r\n\t\"./ar-dz.js\": \"./node_modules/moment/locale/ar-dz.js\",\r\n...\r\n```\r\n\r\nAfter enabling plugin:\r\n```\r\n/***/ \"./node_modules/moment/locale recursive (af\\\\.js)$\":\r\n/***/ (function(module, exports, __webpack_require__) {\r\n\r\nvar map = {\r\n\t\"./af.js\": \"./node_modules/moment/locale/af.js\",\r\n};\r\n```\r\n\r\nFor some reason webpack is trying to load `./af` not `./af.js` in my case. That's why I whitelisted both in the regex.\r\nAfter my change:\r\n```\r\n/***/ \"./node_modules/moment/locale recursive (af(\\\\.js)?)$\":\r\n/***/ (function(module, exports, __webpack_require__) {\r\n\r\nvar map = {\r\n\t\"./af\": \"./node_modules/moment/locale/af.js\",\r\n\t\"./af.js\": \"./node_modules/moment/locale/af.js\",\r\n};\r\n```\r\n","created_at":"2018-05-16T14:48:28Z","updated_at":"2018-05-16T14:48:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/pulls/8/commits","review_comments_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/pulls/8/comments","review_comment_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/issues/8/comments","statuses_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/statuses/4d9eb50326953a937fa9a7638114cb8b42ee7610","head":{"label":"kvas-damian:keep-lang-and-lang.js","ref":"keep-lang-and-lang.js","sha":"4d9eb50326953a937fa9a7638114cb8b42ee7610","user":{"login":"kvas-damian","id":2725894,"avatar_url":"https://avatars2.githubusercontent.com/u/2725894?v=4","gravatar_id":"","url":"https://api.github.com/users/kvas-damian","html_url":"https://github.com/kvas-damian","followers_url":"https://api.github.com/users/kvas-damian/followers","following_url":"https://api.github.com/users/kvas-damian/following{/other_user}","gists_url":"https://api.github.com/users/kvas-damian/gists{/gist_id}","starred_url":"https://api.github.com/users/kvas-damian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvas-damian/subscriptions","organizations_url":"https://api.github.com/users/kvas-damian/orgs","repos_url":"https://api.github.com/users/kvas-damian/repos","events_url":"https://api.github.com/users/kvas-damian/events{/privacy}","received_events_url":"https://api.github.com/users/kvas-damian/received_events","type":"User","site_admin":false},"repo":{"id":133678882,"name":"moment-locales-webpack-plugin","full_name":"kvas-damian/moment-locales-webpack-plugin","owner":{"login":"kvas-damian","id":2725894,"avatar_url":"https://avatars2.githubusercontent.com/u/2725894?v=4","gravatar_id":"","url":"https://api.github.com/users/kvas-damian","html_url":"https://github.com/kvas-damian","followers_url":"https://api.github.com/users/kvas-damian/followers","following_url":"https://api.github.com/users/kvas-damian/following{/other_user}","gists_url":"https://api.github.com/users/kvas-damian/gists{/gist_id}","starred_url":"https://api.github.com/users/kvas-damian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvas-damian/subscriptions","organizations_url":"https://api.github.com/users/kvas-damian/orgs","repos_url":"https://api.github.com/users/kvas-damian/repos","events_url":"https://api.github.com/users/kvas-damian/events{/privacy}","received_events_url":"https://api.github.com/users/kvas-damian/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kvas-damian/moment-locales-webpack-plugin","description":"Easily remove unused Moment.js locales with webpack","fork":true,"url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin","forks_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/forks","keys_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/teams","hooks_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/hooks","issue_events_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/events","assignees_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/tags","blobs_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/languages","stargazers_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/stargazers","contributors_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/contributors","subscribers_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/subscribers","subscription_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/subscription","commits_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/merges","archive_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/downloads","issues_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/labels{/name}","releases_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/kvas-damian/moment-locales-webpack-plugin/deployments","created_at":"2018-05-16T14:34:08Z","updated_at":"2018-05-16T14:34:10Z","pushed_at":"2018-05-16T14:35:10Z","git_url":"git://github.com/kvas-damian/moment-locales-webpack-plugin.git","ssh_url":"git@github.com:kvas-damian/moment-locales-webpack-plugin.git","clone_url":"https://github.com/kvas-damian/moment-locales-webpack-plugin.git","svn_url":"https://github.com/kvas-damian/moment-locales-webpack-plugin","homepage":null,"size":92,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"iamakulov:master","ref":"master","sha":"974854eab90074dc09900f9da26a46f5f9ebba57","user":{"login":"iamakulov","id":2953267,"avatar_url":"https://avatars0.githubusercontent.com/u/2953267?v=4","gravatar_id":"","url":"https://api.github.com/users/iamakulov","html_url":"https://github.com/iamakulov","followers_url":"https://api.github.com/users/iamakulov/followers","following_url":"https://api.github.com/users/iamakulov/following{/other_user}","gists_url":"https://api.github.com/users/iamakulov/gists{/gist_id}","starred_url":"https://api.github.com/users/iamakulov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamakulov/subscriptions","organizations_url":"https://api.github.com/users/iamakulov/orgs","repos_url":"https://api.github.com/users/iamakulov/repos","events_url":"https://api.github.com/users/iamakulov/events{/privacy}","received_events_url":"https://api.github.com/users/iamakulov/received_events","type":"User","site_admin":false},"repo":{"id":117819590,"name":"moment-locales-webpack-plugin","full_name":"iamakulov/moment-locales-webpack-plugin","owner":{"login":"iamakulov","id":2953267,"avatar_url":"https://avatars0.githubusercontent.com/u/2953267?v=4","gravatar_id":"","url":"https://api.github.com/users/iamakulov","html_url":"https://github.com/iamakulov","followers_url":"https://api.github.com/users/iamakulov/followers","following_url":"https://api.github.com/users/iamakulov/following{/other_user}","gists_url":"https://api.github.com/users/iamakulov/gists{/gist_id}","starred_url":"https://api.github.com/users/iamakulov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamakulov/subscriptions","organizations_url":"https://api.github.com/users/iamakulov/orgs","repos_url":"https://api.github.com/users/iamakulov/repos","events_url":"https://api.github.com/users/iamakulov/events{/privacy}","received_events_url":"https://api.github.com/users/iamakulov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/iamakulov/moment-locales-webpack-plugin","description":"Easily remove unused Moment.js locales with webpack","fork":false,"url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin","forks_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/forks","keys_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/teams","hooks_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/hooks","issue_events_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/events","assignees_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/tags","blobs_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/languages","stargazers_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/stargazers","contributors_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/contributors","subscribers_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/subscribers","subscription_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/subscription","commits_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/merges","archive_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/downloads","issues_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/labels{/name}","releases_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/deployments","created_at":"2018-01-17T10:13:22Z","updated_at":"2018-05-13T07:20:25Z","pushed_at":"2018-04-02T19:24:26Z","git_url":"git://github.com/iamakulov/moment-locales-webpack-plugin.git","ssh_url":"git@github.com:iamakulov/moment-locales-webpack-plugin.git","clone_url":"https://github.com/iamakulov/moment-locales-webpack-plugin.git","svn_url":"https://github.com/iamakulov/moment-locales-webpack-plugin","homepage":null,"size":92,"stargazers_count":169,"watchers_count":169,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":5,"open_issues":2,"watchers":169,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/pulls/8"},"html":{"href":"https://github.com/iamakulov/moment-locales-webpack-plugin/pull/8"},"issue":{"href":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/issues/8"},"comments":{"href":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/iamakulov/moment-locales-webpack-plugin/statuses/4d9eb50326953a937fa9a7638114cb8b42ee7610"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":1,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"kvas-damian"}}