sagiegurari / node-go-require

Load Google GO files as any javascript modules under nodeJS runtime.
Apache License 2.0
154 stars 10 forks source link

Suggestion: minify gopherjs code #3

Closed jackkleeman closed 7 years ago

jackkleeman commented 7 years ago

I think the gopherjs build command should have an -m command to produce minified code; the gopherjs tool is better at minifying its out than any other minifier, so this is preferable to minifying the resulting code manually.

sagiegurari commented 7 years ago

Thanks for the suggestion, I'll think about how to set it up so the require would do minify if you wish to (probably by setting some env var).

sagiegurari commented 7 years ago

In order to generate minified javascript code, first set the following environment variable:

NODE_GO_REQUIRE_MINIFY=TRUE