These are chat archives for ramda/ramda

Dec 2016
Marcus Nielsen
Dec 24 2016 11:03 UTC

Hi, is there some good documentation for minimizing the build size of ramda with webpack (v2)?

8583eb5fbaa8685bfde4.ramda.js     305 kB  3, 4[emitted]  [big]ramda

The file starts and ends with ramda content, but it’s full of comments and probably all of the content although I’m just importing a couple of functions via import {merge as ramdaMerge} from ‘ramda’. Any handy tips of what you usually should do?

Marcus Nielsen
Dec 24 2016 11:30 UTC
example: Ramda via cdn downloads 11.8 kb of content (ref: ).
While my current webpack build of ramada ends up with 299 kb when compared in the chrome network tab.
I’ve checked the file for ramda, and it starts and ends with ramda content, so nothing else than ramda is there except some small webpack jsonp stuff for loading it.
Marcus Nielsen
Dec 24 2016 11:54 UTC
down to 41.8 kb by using node_modules/ramda/dist/ramda.min.js, but it’s still a lot higher than then cdn version. What’s the reason for the diff in size between the npm minified dist file and the cdn version?
and is dead code elimination possible with ramda?
Jared McGuire
Dec 24 2016 15:18 UTC
@marcusnielsen I've read that webpack 2 supports tree shaking for es6 ( I have not used it, but from what I understand, it should remove dead code.
Marcus Nielsen
Dec 24 2016 17:07 UTC
@jrdmcgr I'm trying to sort things out why dead code and comments aren't removed in the webpack chat. More ppl have the same issue. But why is there a diff in file size between the node_modules/ramda/dist/ramda.min.js and the cdn minified version?