{"action":"opened","issue":{"url":"https://api.github.com/repos/lodash/babel-plugin-lodash/issues/131","repository_url":"https://api.github.com/repos/lodash/babel-plugin-lodash","labels_url":"https://api.github.com/repos/lodash/babel-plugin-lodash/issues/131/labels{/name}","comments_url":"https://api.github.com/repos/lodash/babel-plugin-lodash/issues/131/comments","events_url":"https://api.github.com/repos/lodash/babel-plugin-lodash/issues/131/events","html_url":"https://github.com/lodash/babel-plugin-lodash/issues/131","id":174858684,"number":131,"title":"Bundle becomes bigger when using plugin.","user":{"login":"eldh","id":612703,"avatar_url":"https://avatars.githubusercontent.com/u/612703?v=3","gravatar_id":"","url":"https://api.github.com/users/eldh","html_url":"https://github.com/eldh","followers_url":"https://api.github.com/users/eldh/followers","following_url":"https://api.github.com/users/eldh/following{/other_user}","gists_url":"https://api.github.com/users/eldh/gists{/gist_id}","starred_url":"https://api.github.com/users/eldh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eldh/subscriptions","organizations_url":"https://api.github.com/users/eldh/orgs","repos_url":"https://api.github.com/users/eldh/repos","events_url":"https://api.github.com/users/eldh/events{/privacy}","received_events_url":"https://api.github.com/users/eldh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-02T22:23:39Z","updated_at":"2016-09-02T22:23:39Z","closed_at":null,"body":"So, still not really sure what's going on here, but I'll try to give the best info I can.\r\n\r\nProblem: My bundle becomes bigger, not smaller, when using  babel-plugin-lodash.\r\n\r\nMy webpack build produces two files: client.js and vendor.js (lodash is included in vendor.js).\r\n\r\nclient.js without plugin: 1 141 480 bytes unzipped, 249KB gzipped\r\nclient.js with plugin: 1 199 622 bytes unzipped, 312KB gzipped.\r\nvendor.js without plugin: 548KB unzipped, 149KB gzipped\r\nvendor.js with plugin: 479KB unzipped, 124KB gzipped\r\n\r\nSo vendor.js shrinks by 25KB with the plugin, but client.js eats that up and then some by growing 63KB.\r\n\r\nAccording to the generated stats.json files, lodash takes up 5% of the build with plugin and 15% without the plugin, and this seems to be reflected in vendor.js.\r\n\r\nMy very uninformed guess, after looking at the generated bundle, is that the requires in the code are harder to gzip, because each lodash sub-module is required. \r\n\r\nThere are 779 instances of `/lodash` in the plugin bundle, all referring directly to the function being imported at that specific point (i.e `lodash/_baseGet`, `lodash/find` etc) .\r\nIn the no-plugin bundle there are 203 instances of `/lodash` all from require calls to lodash/lodash.\r\n\r\nNow, my question is if I can get around this somehow? I don't quite understand enough about what's going on here to see a way forward..."}}
{"actor":{"display_login":"eldh"}}