Closed beenotung closed 2 years ago
Hi @beenotung ! Thanks for your observation!
gotoB.min.js
is already minified. The reason that gotoB.min.js
is larger in size than gotoB.js
(44k vs 30k) is that gotoB.min.js
contains the code for all its dependencies as well. If you added that code, the un-minified file would be 85k.
You can try that by installing the dependencies (by running npm install
) and then running node build dev
; after you do, you'll see that gotoB.min.js
is not minified but does have all its dependencies bundled in it.
The code for building gotoB.min.js
is here. In particular, on line 33, we use UglifyJS to minify the file.
Cheers!
gotoB.js
is 30K in turns of fileCurrently, the file size of
gotoB.js
is 30K, and the file size ofgotoB.min.js
is 44K, which is bigger than the source file.If you use the
minify
cli, you can reduce the file size ofgotoB.min.js
to 16K.Setup Steps: