What JavaScript minifier do you recommend?
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
UglifyJS2, used by the jQuery project.
jscompressor.com is pretty good.
There are several you can use/try:
Active
Deprecated
Google Closure Compiler generally achieves smaller files than YUI Compressor, particularly if you use the advanced mode, which looks worryingly meddlesome to me but has worked well on the one project I've used it on:
Several big projects use UglifyJS, and I've been very impressed with it since switching.
YUI minifier
Sometimes i use this: http://closure-compiler.appspot.com/home