The Kotlin/JS compiler
The Kotlin/JS compiler is the final piece of the puzzle for sharing code between different platforms. There are many use cases in which you could leverage this compiler, as follows:
- Sharing code between the backend and the frontend. If your backend is written in Node.js and you'd like to share code between your backends and frontend, Kotlin/JS can be a great tool.
- Sharing code between mobile platforms and the web, which is a great way to keep your frontend in sync.
So, what do you need to know about the Kotlin/JS backend compiler?
How it works
Kotlin/JS currently targets the ECMAScript 5 (ES5) JavaScript standard. As we saw with the Kotlin/JVM and Kotlin/Native compilers, Kotlin/JS has a similar process but produces a different type of executable. In short, it takes Kotlin code that it then translates into JavaScript code, given that the underlying code uses dependencies that can run on JavaScript.
It is currently migrating to...