{"action":"opened","number":1858,"pull_request":{"url":"https://api.github.com/repos/netlify/netlify-cms/pulls/1858","id":228663824,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4NjYzODI0","html_url":"https://github.com/netlify/netlify-cms/pull/1858","diff_url":"https://github.com/netlify/netlify-cms/pull/1858.diff","patch_url":"https://github.com/netlify/netlify-cms/pull/1858.patch","issue_url":"https://api.github.com/repos/netlify/netlify-cms/issues/1858","number":1858,"state":"open","locked":false,"title":"WIP: rollup and ESM export","user":{"login":"LoicMahieu","id":900947,"node_id":"MDQ6VXNlcjkwMDk0Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/900947?v=4","gravatar_id":"","url":"https://api.github.com/users/LoicMahieu","html_url":"https://github.com/LoicMahieu","followers_url":"https://api.github.com/users/LoicMahieu/followers","following_url":"https://api.github.com/users/LoicMahieu/following{/other_user}","gists_url":"https://api.github.com/users/LoicMahieu/gists{/gist_id}","starred_url":"https://api.github.com/users/LoicMahieu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LoicMahieu/subscriptions","organizations_url":"https://api.github.com/users/LoicMahieu/orgs","repos_url":"https://api.github.com/users/LoicMahieu/repos","events_url":"https://api.github.com/users/LoicMahieu/events{/privacy}","received_events_url":"https://api.github.com/users/LoicMahieu/received_events","type":"User","site_admin":false},"body":"\r\n### 1. Summary\r\n\r\nIt's a quite big PR for my first contribution. I'm sorry, I would have preferred to find something easier to do at first. I tried something simple, it's in the garage... I could not develop it on top of the actual build system due to performance.\r\n\r\nThere is some problem in the current build implementation:\r\n- All modules (except `netlify-cms`) produces a UMD build which, I think, is never used by anyone. (Maybe there is a case for import manually a widget or something else ?)\r\n- `netlify-cms` module have an \"hacky\" import. Since we don't want to bundle once again a UMD bundle from other UMD bundles, [it imports directly `/src`](https://github.com/netlify/netlify-cms/blob/master/packages/netlify-cms/src/widgets.js#L2-L14).\r\n- `netlify-cms` have a bunch of `dependencies` that are not used in production, since every dependencies are bundled.\r\n- Build is slow. In my machine, I have waited more than 5 minutes for a complete build with all CPU to the top!\r\n\r\n#### Important changes:\r\n\r\n- Switch to `rollup` instead of `webpack` for all modules (except `netlify-cms`). It only produces a `ESM` build.\r\n- `netlify-cms` still build an UMD package from the ESM with webpack.\r\n- icons: switch to `rollup-plugin-react-svg` for SVG to React transformation. It does not seem to change much.\r\n- Remove alias and `module-resolver`. It was initially proposed in PR #1847. I did that because I found difficulties to implement it with Rollup and...... since I don't like it much... 😚 But it should be possible to use it. If you want to see them come back, yell at me and I'll do what's necessary.\r\n\r\n#### Advantages:\r\n\r\n- Build time is improved! On my machine, **62.84s** for a full build.\r\n- Well described by @GabeMedrash in:\r\n  * https://github.com/netlify/netlify-cms/issues/1829\r\n  * https://github.com/netlify/netlify-cms/pull/1770#issuecomment-431930708\r\n\r\n#### Fixes issues:\r\n\r\n- Fix #1829\r\n- Probably fix #1389\r\n\r\n#### Breaking changes\r\n\r\n- All modules (**except `netlify-cms`**) will not exports a `main` file but only an `module` file.\r\nIt does not introduce any breaking change on `netlify-cms`.\r\nI don't know if they are used separately/directly.\r\n- I don't see any other breaking change 😅\r\n\r\n\r\n### 2. Test plan\r\n\r\nCI should confirm that build works. Tested on my machine, build and develop works well!\r\n\r\n### 3. A picture of a cute animal\r\n\r\nAs big as this PR!\r\n\r\n![huge-dogs-puppies-06](https://user-images.githubusercontent.com/900947/48062296-e7481a00-e1c1-11e8-8067-a11c84f34b47.jpg)\r\n\r\n","created_at":"2018-11-06T11:46:21Z","updated_at":"2018-11-06T11:46:21Z","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/netlify/netlify-cms/pulls/1858/commits","review_comments_url":"https://api.github.com/repos/netlify/netlify-cms/pulls/1858/comments","review_comment_url":"https://api.github.com/repos/netlify/netlify-cms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/netlify/netlify-cms/issues/1858/comments","statuses_url":"https://api.github.com/repos/netlify/netlify-cms/statuses/4bdaf82ed0ee47494d71aba7834e0811e7335d0b","head":{"label":"LoicMahieu:feature/rollup","ref":"feature/rollup","sha":"4bdaf82ed0ee47494d71aba7834e0811e7335d0b","user":{"login":"LoicMahieu","id":900947,"node_id":"MDQ6VXNlcjkwMDk0Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/900947?v=4","gravatar_id":"","url":"https://api.github.com/users/LoicMahieu","html_url":"https://github.com/LoicMahieu","followers_url":"https://api.github.com/users/LoicMahieu/followers","following_url":"https://api.github.com/users/LoicMahieu/following{/other_user}","gists_url":"https://api.github.com/users/LoicMahieu/gists{/gist_id}","starred_url":"https://api.github.com/users/LoicMahieu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LoicMahieu/subscriptions","organizations_url":"https://api.github.com/users/LoicMahieu/orgs","repos_url":"https://api.github.com/users/LoicMahieu/repos","events_url":"https://api.github.com/users/LoicMahieu/events{/privacy}","received_events_url":"https://api.github.com/users/LoicMahieu/received_events","type":"User","site_admin":false},"repo":{"id":155532127,"node_id":"MDEwOlJlcG9zaXRvcnkxNTU1MzIxMjc=","name":"netlify-cms","full_name":"LoicMahieu/netlify-cms","private":false,"owner":{"login":"LoicMahieu","id":900947,"node_id":"MDQ6VXNlcjkwMDk0Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/900947?v=4","gravatar_id":"","url":"https://api.github.com/users/LoicMahieu","html_url":"https://github.com/LoicMahieu","followers_url":"https://api.github.com/users/LoicMahieu/followers","following_url":"https://api.github.com/users/LoicMahieu/following{/other_user}","gists_url":"https://api.github.com/users/LoicMahieu/gists{/gist_id}","starred_url":"https://api.github.com/users/LoicMahieu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LoicMahieu/subscriptions","organizations_url":"https://api.github.com/users/LoicMahieu/orgs","repos_url":"https://api.github.com/users/LoicMahieu/repos","events_url":"https://api.github.com/users/LoicMahieu/events{/privacy}","received_events_url":"https://api.github.com/users/LoicMahieu/received_events","type":"User","site_admin":false},"html_url":"https://github.com/LoicMahieu/netlify-cms","description":"A CMS for Static Site Generators","fork":true,"url":"https://api.github.com/repos/LoicMahieu/netlify-cms","forks_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/forks","keys_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/teams","hooks_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/hooks","issue_events_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/issues/events{/number}","events_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/events","assignees_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/assignees{/user}","branches_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/branches{/branch}","tags_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/tags","blobs_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/statuses/{sha}","languages_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/languages","stargazers_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/stargazers","contributors_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/contributors","subscribers_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/subscribers","subscription_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/subscription","commits_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/issues/comments{/number}","contents_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/contents/{+path}","compare_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/merges","archive_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/downloads","issues_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/issues{/number}","pulls_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/pulls{/number}","milestones_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/milestones{/number}","notifications_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/labels{/name}","releases_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/releases{/id}","deployments_url":"https://api.github.com/repos/LoicMahieu/netlify-cms/deployments","created_at":"2018-10-31T09:35:43Z","updated_at":"2018-10-31T09:35:47Z","pushed_at":"2018-11-06T11:03:36Z","git_url":"git://github.com/LoicMahieu/netlify-cms.git","ssh_url":"git@github.com:LoicMahieu/netlify-cms.git","clone_url":"https://github.com/LoicMahieu/netlify-cms.git","svn_url":"https://github.com/LoicMahieu/netlify-cms","homepage":"https://www.netlifycms.org","size":27637,"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":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"netlify:master","ref":"master","sha":"f69a04efe8e173cbb115f4c3e6e4ff5738739e13","user":{"login":"netlify","id":7892489,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc4OTI0ODk=","avatar_url":"https://avatars1.githubusercontent.com/u/7892489?v=4","gravatar_id":"","url":"https://api.github.com/users/netlify","html_url":"https://github.com/netlify","followers_url":"https://api.github.com/users/netlify/followers","following_url":"https://api.github.com/users/netlify/following{/other_user}","gists_url":"https://api.github.com/users/netlify/gists{/gist_id}","starred_url":"https://api.github.com/users/netlify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netlify/subscriptions","organizations_url":"https://api.github.com/users/netlify/orgs","repos_url":"https://api.github.com/users/netlify/repos","events_url":"https://api.github.com/users/netlify/events{/privacy}","received_events_url":"https://api.github.com/users/netlify/received_events","type":"Organization","site_admin":false},"repo":{"id":29514104,"node_id":"MDEwOlJlcG9zaXRvcnkyOTUxNDEwNA==","name":"netlify-cms","full_name":"netlify/netlify-cms","private":false,"owner":{"login":"netlify","id":7892489,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc4OTI0ODk=","avatar_url":"https://avatars1.githubusercontent.com/u/7892489?v=4","gravatar_id":"","url":"https://api.github.com/users/netlify","html_url":"https://github.com/netlify","followers_url":"https://api.github.com/users/netlify/followers","following_url":"https://api.github.com/users/netlify/following{/other_user}","gists_url":"https://api.github.com/users/netlify/gists{/gist_id}","starred_url":"https://api.github.com/users/netlify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netlify/subscriptions","organizations_url":"https://api.github.com/users/netlify/orgs","repos_url":"https://api.github.com/users/netlify/repos","events_url":"https://api.github.com/users/netlify/events{/privacy}","received_events_url":"https://api.github.com/users/netlify/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/netlify/netlify-cms","description":"A CMS for Static Site Generators","fork":false,"url":"https://api.github.com/repos/netlify/netlify-cms","forks_url":"https://api.github.com/repos/netlify/netlify-cms/forks","keys_url":"https://api.github.com/repos/netlify/netlify-cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/netlify/netlify-cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/netlify/netlify-cms/teams","hooks_url":"https://api.github.com/repos/netlify/netlify-cms/hooks","issue_events_url":"https://api.github.com/repos/netlify/netlify-cms/issues/events{/number}","events_url":"https://api.github.com/repos/netlify/netlify-cms/events","assignees_url":"https://api.github.com/repos/netlify/netlify-cms/assignees{/user}","branches_url":"https://api.github.com/repos/netlify/netlify-cms/branches{/branch}","tags_url":"https://api.github.com/repos/netlify/netlify-cms/tags","blobs_url":"https://api.github.com/repos/netlify/netlify-cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/netlify/netlify-cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/netlify/netlify-cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/netlify/netlify-cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/netlify/netlify-cms/statuses/{sha}","languages_url":"https://api.github.com/repos/netlify/netlify-cms/languages","stargazers_url":"https://api.github.com/repos/netlify/netlify-cms/stargazers","contributors_url":"https://api.github.com/repos/netlify/netlify-cms/contributors","subscribers_url":"https://api.github.com/repos/netlify/netlify-cms/subscribers","subscription_url":"https://api.github.com/repos/netlify/netlify-cms/subscription","commits_url":"https://api.github.com/repos/netlify/netlify-cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/netlify/netlify-cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/netlify/netlify-cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/netlify/netlify-cms/issues/comments{/number}","contents_url":"https://api.github.com/repos/netlify/netlify-cms/contents/{+path}","compare_url":"https://api.github.com/repos/netlify/netlify-cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/netlify/netlify-cms/merges","archive_url":"https://api.github.com/repos/netlify/netlify-cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/netlify/netlify-cms/downloads","issues_url":"https://api.github.com/repos/netlify/netlify-cms/issues{/number}","pulls_url":"https://api.github.com/repos/netlify/netlify-cms/pulls{/number}","milestones_url":"https://api.github.com/repos/netlify/netlify-cms/milestones{/number}","notifications_url":"https://api.github.com/repos/netlify/netlify-cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/netlify/netlify-cms/labels{/name}","releases_url":"https://api.github.com/repos/netlify/netlify-cms/releases{/id}","deployments_url":"https://api.github.com/repos/netlify/netlify-cms/deployments","created_at":"2015-01-20T05:47:47Z","updated_at":"2018-11-06T11:24:14Z","pushed_at":"2018-11-06T03:00:09Z","git_url":"git://github.com/netlify/netlify-cms.git","ssh_url":"git@github.com:netlify/netlify-cms.git","clone_url":"https://github.com/netlify/netlify-cms.git","svn_url":"https://github.com/netlify/netlify-cms","homepage":"https://www.netlifycms.org","size":27561,"stargazers_count":6662,"watchers_count":6662,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":960,"mirror_url":null,"archived":false,"open_issues_count":347,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":960,"open_issues":347,"watchers":6662,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/netlify/netlify-cms/pulls/1858"},"html":{"href":"https://github.com/netlify/netlify-cms/pull/1858"},"issue":{"href":"https://api.github.com/repos/netlify/netlify-cms/issues/1858"},"comments":{"href":"https://api.github.com/repos/netlify/netlify-cms/issues/1858/comments"},"review_comments":{"href":"https://api.github.com/repos/netlify/netlify-cms/pulls/1858/comments"},"review_comment":{"href":"https://api.github.com/repos/netlify/netlify-cms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/netlify/netlify-cms/pulls/1858/commits"},"statuses":{"href":"https://api.github.com/repos/netlify/netlify-cms/statuses/4bdaf82ed0ee47494d71aba7834e0811e7335d0b"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":2,"additions":1318,"deletions":476,"changed_files":143}}
{"actor":{"display_login":"LoicMahieu"}}