ColorlibHQ/Sparkling

Minified javascript files are larger than non minified files

vinoddalvi opened this issue · 2 comments

Minified javascript files are larger than non minified files as displayed below instead it should be opposite.

assets/js/vendor/bootstrap.js – 69KB
assets/js/vendor/bootstrap.min.js 434KB

Related Topic:
https://colorlib.com/wp/forums/topic/large-minified-js-in-theme/

@vinoddalvi - I'll have a look at this :)

@vinoddalvi - This was being caused by our own Grunt minify task which was not deleting files before re-minifying them. Basically, on each minify task run, Grunt would run over the files, re-minify their contents and append it to the pre-existing content.

Run it 4-5 times, you can guess how the sizes got so big :) I have, in the meantime, removed Grunt from this project as it's not needed. Most 3rd party libraries bundled today already provide .min files and there's no need for Grunt tasks.

Good catch!