{"action":"created","issue":{"url":"https://api.github.com/repos/whawker/react-jsx-highcharts/issues/92","repository_url":"https://api.github.com/repos/whawker/react-jsx-highcharts","labels_url":"https://api.github.com/repos/whawker/react-jsx-highcharts/issues/92/labels{/name}","comments_url":"https://api.github.com/repos/whawker/react-jsx-highcharts/issues/92/comments","events_url":"https://api.github.com/repos/whawker/react-jsx-highcharts/issues/92/events","html_url":"https://github.com/whawker/react-jsx-highcharts/pull/92","id":312450985,"number":92,"title":"Build ES6 module for highcharts","user":{"login":"anajavi","id":2248637,"avatar_url":"https://avatars2.githubusercontent.com/u/2248637?v=4","gravatar_id":"","url":"https://api.github.com/users/anajavi","html_url":"https://github.com/anajavi","followers_url":"https://api.github.com/users/anajavi/followers","following_url":"https://api.github.com/users/anajavi/following{/other_user}","gists_url":"https://api.github.com/users/anajavi/gists{/gist_id}","starred_url":"https://api.github.com/users/anajavi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anajavi/subscriptions","organizations_url":"https://api.github.com/users/anajavi/orgs","repos_url":"https://api.github.com/users/anajavi/repos","events_url":"https://api.github.com/users/anajavi/events{/privacy}","received_events_url":"https://api.github.com/users/anajavi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-09T09:07:56Z","updated_at":"2018-04-09T09:33:58Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/whawker/react-jsx-highcharts/pulls/92","html_url":"https://github.com/whawker/react-jsx-highcharts/pull/92","diff_url":"https://github.com/whawker/react-jsx-highcharts/pull/92.diff","patch_url":"https://github.com/whawker/react-jsx-highcharts/pull/92.patch"},"body":"This PR adds ES module build for react-jsx-highcharts.\r\nThis lets webpack 4 do tree shaking and module concatenation which saves me around 50kB in final bundle.\r\n\r\nAs I am not too familiar with the source code, I am not 100% sure that setting \"sideEffects\": false is entirely safe. On the surface it seems to be.\r\nThe sideEffects flag can also be array of globs if there are side effects of importing some modules.\r\n\r\nIt also modifies the ES build to use lodash-es instead of lodash. That babel plugin is copied from https://github.com/PaulLeCam/react-leaflet\r\nThe lodash-es allows some more tree shaking.\r\nAs there is no commonjs build, the lodash-es could be used in unmodified source too.\r\n\r\nI also tried building UMD with webpack 4 and that also saves some space. I can make separate PR for it if you like?\r\n\r\nI did not add this build to highstock package as I don't have real world application to test it with.\r\n\r\nDo you think this is okay to be included in react-jsx-highcharts?"},"comment":{"url":"https://api.github.com/repos/whawker/react-jsx-highcharts/issues/comments/379692901","html_url":"https://github.com/whawker/react-jsx-highcharts/pull/92#issuecomment-379692901","issue_url":"https://api.github.com/repos/whawker/react-jsx-highcharts/issues/92","id":379692901,"user":{"login":"anajavi","id":2248637,"avatar_url":"https://avatars2.githubusercontent.com/u/2248637?v=4","gravatar_id":"","url":"https://api.github.com/users/anajavi","html_url":"https://github.com/anajavi","followers_url":"https://api.github.com/users/anajavi/followers","following_url":"https://api.github.com/users/anajavi/following{/other_user}","gists_url":"https://api.github.com/users/anajavi/gists{/gist_id}","starred_url":"https://api.github.com/users/anajavi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anajavi/subscriptions","organizations_url":"https://api.github.com/users/anajavi/orgs","repos_url":"https://api.github.com/users/anajavi/repos","events_url":"https://api.github.com/users/anajavi/events{/privacy}","received_events_url":"https://api.github.com/users/anajavi/received_events","type":"User","site_admin":false},"created_at":"2018-04-09T09:33:58Z","updated_at":"2018-04-09T09:33:58Z","author_association":"NONE","body":"Webpack 4 is not needed for ES build, but it makes smaller UMD build. I will send another PR for it.\r\n\r\nI was pretty amazed by 50kB saving in real world application. Most of it comes from reusing lodash-es by react-leaflet and our own code. Without lodash-es the saving was 20kB."}}
{"actor":{"display_login":"anajavi"}}