Is there a way to compile JavaScript code and distribute it along with the other files in the site instead of distributing the source code itself? As in Java it compiles to bytecodes , so you distribute your bytecodes and not the source code itself.
Is there a way to compile JavaScript code and distribute it along with the other files in the site instead of distributing the source code itself? As in Java it compiles to bytecodes , so you distribute your bytecodes and not the source code itself.
In general it does not. And compiling for compiling does not help much. There is now WebAssembly and several languages are used as bytecode , nothing prevents JS be like that too, but I have not seen anything official. It has isolated initiatives, but not exactly what it wants. Example , you can have others, this changes the "every" day.