Adding additional Minifiers e.g. UglifyJS?

106 views
Skip to first unread message

Dave Walker

unread,
Mar 17, 2014, 2:47:01 AM3/17/14
to squi...@googlegroups.com
Hi, haven't seen any information about doing this. We've seen some significant improvements in minification with using UglifyJS as part of our minification steps for other parts of our site.

Alex Ullrich

unread,
Mar 18, 2014, 7:59:02 AM3/18/14
to squi...@googlegroups.com
If you look at the coffeescript or hogan preprocessors you will see how we include javascript as an embedded resource and execute it using either jurassic or a wrapper around IE's javascript engine.


From here it is pretty easy to implement your own IJavaScriptMinifier

You can then register it globally using the following somewhere in App_Start:

Bundle.ConfigureDefaults().UseMinifierForJs(new MyUglifyMinifier());

This is not included in the framework assembly because both techniques bring pretty heavy dependencies.  If you want to start an issue on github to see if there is a lot of demand for this I can keep an eye on it - it may make sense to have different minification packages available on NuGet similar to what we have for preprocessors. 

Christian White

unread,
Feb 27, 2015, 4:15:49 PM2/27/15
to squi...@googlegroups.com
http://www.scriptcompress.com/JavaScript-Packers.htm minifies like uglifyJS, plus it compresses, packs and obfuscates JavaScript
Reply all
Reply to author
Forward
0 new messages