Compressing resulting JS

2022-02-14 Thread Araq
None of these articles have any relevance... Yes, websites are bloated. The solution is **not** to compress your Javascript... The solution is to cut the number of dependencies and to emit only code that is actually used and Nim is excellent at that already.

Compressing resulting JS

2022-02-14 Thread alexeypetrushin
Yes, ClosureCompiler is smart, especially if it has access to the full code. So should work quite well with Nim JS build containing full Nim JS code.

Compressing resulting JS

2022-02-12 Thread dom96
Here is what I use for Stardust.dev's JS: task clientr, "Build JS sources": exec "nimble js -d:client -d:js -d:danger --out:out/client.js client.nim" when defined(linux): # Little hack, replace {val: 0, has: false, val: 0, has: false} exec "sed -i 's/{val:

Compressing resulting JS

2022-02-12 Thread xigoi

Compressing resulting JS

2022-02-12 Thread SolitudeSF
bad take

Compressing resulting JS

2022-02-12 Thread Hlaaftana
Just these options should give the same JS output as your arguments: --d:danger --mm:orc --overflowChecks:on Run `--checks:off` is implied by `--d:danger`. `--overflowChecks:on` overrides `--d:danger` and decreases performance/increases code size, unless you have a re

Compressing resulting JS

2022-02-12 Thread Araq
Live with the additional KBs that are produced and compensate for it by reducing your daily online time by 2 seconds.

Compressing resulting JS

2022-02-12 Thread planetis
You are right most of these don't help. Try:

Compressing resulting JS

2022-02-12 Thread drkameleon
I've been experiment with Nim + JS (not node.js) and wondering how to produce an even more compact, junk-free, final js output. Right now, I'm compiling with: --skipUserCfg:on --skipProjCfg:on --skipParentCfg:on --colors:off --d:danger --panics:off --mm:orc --checks:off --overflowC