Javascript compiled in the browser

Asked

Viewed 183 times

1

Is there a way to compile Javascript code and distribute it together with the other files of the site instead of distributing the source code itself? As in Java that compiles to bytecodes, so you distribute your bytecodes and not the source code itself.

  • You can use Gulp-javascript-Obfuscator, I think it can help you.

  • Nowadays there is not much to hide them. What would be the motivation? Code obfuscators may be subject to bugs and may hinder maintenance as well.

1 answer

4


Generally speaking it doesn’t. And compiling by compiling doesn’t help much. Now there is Webassembly and various languages are used as bytecode, nothing prevents JS from being like this either, but I have seen nothing official. It has isolated initiatives, but not exactly what it is wanting. Example, can have others, it changes the "every" day.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.