dyo / dyo

Dyo is a JavaScript library for building user interfaces.

Home Page:https://dyo.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No terser compression?

mcjazzyfunky opened this issue · comments

@thysultan
Is there a special reason why in file build.js the terser option parameter compress is set to false?

If compression is activated the generated files are a lot smaller.

Without compression (current):
dyo.esm.js:20690
dyo.esm.js.gz:6929
dyo.umd.js:20916
dyo.umd.js.gz:7040

With compression (using default config):
dyo.esm.js:18988
dyo.esm.js.gz:6716
dyo.umd.js:19116
dyo.umd.js.gz:6761

Not sure, i think there was some issues with compress at the time that affected runtime correctness/perf, and since 99% of savings come from mangling decided to disable it.

Well, I've used a compressed version with a bunch of simple demos and had no problems .... but of course, that does not really proof anything.
Maybe, if Dyo's size is increasing in future and will get larger than 7 kB, we could give a try and activate compression to reduce it to 6.x kB again, as the bundle size seems to be an important selling point for UI libraries.

Just FYI:

While Bundlephobia shows a current size of 6.6 kb:
https://badgen.net/bundlephobia/minzip/dyo

.... Badgesize shows a size of 6.98 kB:
http://img.badgesize.io/https://unpkg.com/dyo/dist/dyo.umd.js?compression=gzip

I will close this issue now.