dave/jsgo

UglifyJS

Opened this issue · 4 comments

pjebs commented

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

dave commented

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 commented

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...

pjebs commented

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.

dave commented

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.