Kevin Ingwersen
unread,May 15, 2015, 9:51:31 AM5/15/15Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nod...@googlegroups.com
Hey.
When working with C++ stuff, I usually see myself running the stirp over the resulting binary to press down the filesize on a Release target. However, there seems to be no such thing for JavaScript.
What I am actually wanting to do, is to shrink jQuery. It has tons, and tons, and tons of stuff inside of it, and it is like so much, I only use 10% of it, when it comes to it.
So I was looking for some tool that strips unused code…
Since I am using WebPack, I get all the code, transpiled, compiled, and whatever, into a single target. This target, I can edit using a plugin. (Well, could. Plugin docs are still sparse.)
Do you know a tool that does dead code elimination, that actually works? I am aware of refs and such. Like:
var getElem = document.getElementById;
var cont = getElemen(…);
… but there must be a way. Somehow, at least I hope so.
Kind regards, Ingwie.