{"action":"closed","issue":{"url":"https://api.github.com/repos/lodash/lodash/issues/3030","repository_url":"https://api.github.com/repos/lodash/lodash","labels_url":"https://api.github.com/repos/lodash/lodash/issues/3030/labels{/name}","comments_url":"https://api.github.com/repos/lodash/lodash/issues/3030/comments","events_url":"https://api.github.com/repos/lodash/lodash/issues/3030/events","html_url":"https://github.com/lodash/lodash/issues/3030","id":210365454,"number":3030,"title":"Could we reduce lodash size?","user":{"login":"jakwuh","id":11235552,"avatar_url":"https://avatars.githubusercontent.com/u/11235552?v=3","gravatar_id":"","url":"https://api.github.com/users/jakwuh","html_url":"https://github.com/jakwuh","followers_url":"https://api.github.com/users/jakwuh/followers","following_url":"https://api.github.com/users/jakwuh/following{/other_user}","gists_url":"https://api.github.com/users/jakwuh/gists{/gist_id}","starred_url":"https://api.github.com/users/jakwuh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakwuh/subscriptions","organizations_url":"https://api.github.com/users/jakwuh/orgs","repos_url":"https://api.github.com/users/jakwuh/repos","events_url":"https://api.github.com/users/jakwuh/events{/privacy}","received_events_url":"https://api.github.com/users/jakwuh/received_events","type":"User","site_admin":false},"labels":[{"id":2763156,"url":"https://api.github.com/repos/lodash/lodash/labels/question","name":"question","color":"d4c5f9","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-02-27T01:07:59Z","updated_at":"2017-02-27T02:22:28Z","closed_at":"2017-02-27T02:22:28Z","body":"Hi!\r\n\r\nI see lodash es6 build is on the go, this is amazing, thank you @jdalton & contribs a lot!\r\n\r\nThe problem I've recently faced with was the following: I never use Buffers / Streams (obviously) & ArrayViews / Symbols / Maps / Sets (because of a browser support) on the client. Thus I don't need any related code to be bundled in my final client build. As far as there are no more libs like lodash, our current solution was to reimplement most of the lodash methods and port the tests, which resulted into reducing the final bundle size by 3 times.\r\n\r\nI wonder if we can do something similar with lodash? The most obvious way to do this (as I see it) is to cover code with guards:\r\n```\r\nif (IS_SERVER_BUILD) {\r\n // code which work with buffers\r\n}\r\n```\r\nthen strip it out with `uglify` and ship 2 builds: `lodash-server` & `lodash-client`.\r\n\r\nActually, I'm not sure this is important to many lodash users, but still think it worth asking.\r\n\r\n"}}
{"actor":{"display_login":"jdalton"}}