nolanlawson / optimize-js

Optimize a JS file for faster parsing (UNMAINTAINED)
https://nolanlawson.github.io/optimize-js
Apache License 2.0
3.75k stars 104 forks source link

Is there a browser side version? #42

Closed Josema closed 7 years ago

Josema commented 7 years ago

I would like to use optimize-js on the browser. Is that possible?

nolanlawson commented 7 years ago

Sure, you can try browserifying it, but note that it will probably be quite heavy and therefore remove any benefit of the optimized code.

Josema commented 7 years ago

I tried browserifying and just added a window.optimizeJs = optimizeJs; to export the function. But the ouput is always the same as the input. https://plnkr.co/edit/bQH6WME3nSV8DjDiEynr?p=preview