xpra icon
Bug tracker and wiki

Opened 7 months ago

Last modified 2 weeks ago

#2709 assigned task

use terser for minification

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: major Milestone: 5.0
Component: html5 Version: 3.0.x
Keywords: Cc:

Description

terser

The main difficulty is to ensure this is installed on all the build environment as there aren't many packages for it...

Change History (4)

comment:1 Changed 7 months ago by brief

Do you plan to use terser standalone? Or in combination with webpack (can bundle assets)?

If nodejs is used, I would also use forge.js as a dependency (as well as the other libraries if possible).

comment:2 Changed 7 months ago by Antoine Martin

Status: newassigned

Do you plan to use terser standalone? Or in combination with webpack (can bundle assets)?

I don't know.
I profoundly dislike how some of those frameworks make it difficult to deploy things.
As things stand, I can just copy the js files, by hand if necessary, and things just work. That's invaluable to me.

comment:3 Changed 7 months ago by brief

uglifyjs.terser exists in sid, ubuntu (disco, eoan, focal) only. It can be used where available.

If terser is not available, minifyjs or yui compressor is used after let/const is replaced by var.
Further JS changes (e.g. ES6) need manual adjustments to be compatible to minifying until terser can be used.

npm is not used to avoid a humongus build dependency, which we can't easily have on MacOS. Furthermore, there should only be one package manager or none (macos).

comment:4 Changed 2 weeks ago by Antoine Martin

Milestone: 4.15.0
Note: See TracTickets for help on using tickets.