{"action":"created","issue":{"url":"https://api.github.com/repos/rse/graphql-query-compress/issues/5","repository_url":"https://api.github.com/repos/rse/graphql-query-compress","labels_url":"https://api.github.com/repos/rse/graphql-query-compress/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/rse/graphql-query-compress/issues/5/comments","events_url":"https://api.github.com/repos/rse/graphql-query-compress/issues/5/events","html_url":"https://github.com/rse/graphql-query-compress/issues/5","id":301855463,"number":5,"title":"Improve size of library","user":{"login":"arackaf","id":11261266,"avatar_url":"https://avatars2.githubusercontent.com/u/11261266?v=4","gravatar_id":"","url":"https://api.github.com/users/arackaf","html_url":"https://github.com/arackaf","followers_url":"https://api.github.com/users/arackaf/followers","following_url":"https://api.github.com/users/arackaf/following{/other_user}","gists_url":"https://api.github.com/users/arackaf/gists{/gist_id}","starred_url":"https://api.github.com/users/arackaf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arackaf/subscriptions","organizations_url":"https://api.github.com/users/arackaf/orgs","repos_url":"https://api.github.com/users/arackaf/repos","events_url":"https://api.github.com/users/arackaf/events{/privacy}","received_events_url":"https://api.github.com/users/arackaf/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-03-02T18:08:36Z","updated_at":"2018-03-03T15:12:07Z","closed_at":"2018-03-03T10:30:47Z","author_association":"NONE","body":"Hi!  I'm making great use of your library over here https://github.com/arackaf/micro-graphql-react  —\r\n Great work, and thank you!\r\n\r\nIt seems the size of your graphql-query-compress utility is being inflated a bit since it's pulling in a *bunch* of stuff from tokenizr which isn't actually used, since tokenizr just exports a single class.  Would you be open to a PR to improve this?  I imagine there's two straightforward ways the library size could be improved here: \r\n\r\n1) inline a subset of tokenizr into graphql-query-compress, using only what's needed.\r\n\r\n2) probably the more sensible option imo, break tokenizr into two classes, a base class, containing only the basic things which this library uses, and then a second class inheriting from that, adding everything else. Tokenizr would of course export default the latter, so this would not be a breaking change. But then also add a named export of the new base class, which graphql-query-compress could import, and then webpack or Rollup should be able to tree shake everything else.\r\n\r\nWould you be open to a PR doing either of those? "},"comment":{"url":"https://api.github.com/repos/rse/graphql-query-compress/issues/comments/370154446","html_url":"https://github.com/rse/graphql-query-compress/issues/5#issuecomment-370154446","issue_url":"https://api.github.com/repos/rse/graphql-query-compress/issues/5","id":370154446,"user":{"login":"rse","id":221273,"avatar_url":"https://avatars3.githubusercontent.com/u/221273?v=4","gravatar_id":"","url":"https://api.github.com/users/rse","html_url":"https://github.com/rse","followers_url":"https://api.github.com/users/rse/followers","following_url":"https://api.github.com/users/rse/following{/other_user}","gists_url":"https://api.github.com/users/rse/gists{/gist_id}","starred_url":"https://api.github.com/users/rse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rse/subscriptions","organizations_url":"https://api.github.com/users/rse/orgs","repos_url":"https://api.github.com/users/rse/repos","events_url":"https://api.github.com/users/rse/events{/privacy}","received_events_url":"https://api.github.com/users/rse/received_events","type":"User","site_admin":false},"created_at":"2018-03-03T15:12:07Z","updated_at":"2018-03-03T15:12:07Z","author_association":"OWNER","body":"IMHO it doesn't matter whether it is Browserify, Rollup, Webpack, Parcel or whatever else bundler. Because all bundlers cause some overhead when they expand the import/require structure and exactly this was it what causes the most overhead at the end. And I've now even already removed from the filesystem the splitted code base I had today, so I don't want to make a second attempt with just a different bundler. As I said, for me the now achieved reduction is in great balance to the fact that the entire Tokenizr API is still involved and ever other splitting would just bring back the additional burden of having to export and document different extension levels of the API."}}
{"actor":{"display_login":"rse"}}