jQuery compiled with Google Closure Compiler

后端 未结 10 893
抹茶落季
抹茶落季 2020-11-29 04:52

Has anyone compiled jQuery against Google\'s newly-released Closure compiler?

There has been reported huge savings in code size. I\'m curious what the benefit is if

10条回答
  •  北荒
    北荒 (楼主)
    2020-11-29 05:33

    I tried with jQuery jQuery 1.3.2

    jQuery-1.3.2.min.js     57254 Bytes
    jQuery closure compiler 49730 Bytes
    -----------------------------------
    Reduced by               7524 Bytes
    Saved 13.31% off the original size
    Saved 10.87% off the gzipped size
    

    Gain of ~7KB

    But it also reports 15 Warnings and I didn't test if it still works

提交回复
热议问题