jsgo icon indicating copy to clipboard operation
jsgo copied to clipboard

UglifyJS

Open pjebs opened this issue 7 years ago • 4 comments

It would be great if you run uglify/ugllify2 afterwards to further minimize file size.

pjebs avatar Nov 14 '18 05:11 pjebs

Thanks for the suggestion! However, in jsgo everything runs in the Go process, so without a Go version of uglify this wouldn't be possible.

dave avatar Nov 14 '18 09:11 dave

BTW did you run any tests to see what percentage compression uglify gives? GopherJS has it's own minify routine which probably isn't as good as uglify but I wouldn't think the difference is that great...

dave avatar Nov 14 '18 09:11 dave

I remember doing a comparison 5-6 months ago and uglification created serious improvements to size (non-negligible).

I think a docker based solution is the way to go if you want to run uglify as easily as possible.

pjebs avatar Nov 14 '18 09:11 pjebs

Adding this to the jsgo compiler would be a huge undertaking. Right now everything runs inside a single Go process - that keeps the architecture very simple. Adding docker as a dependency would make things much more complex.

Also, I'm working on other projects now, so won't have any more time for new jsgo features.

dave avatar Nov 14 '18 10:11 dave