Hi! Is there anyone here who can help with the Koltin compiler API? In short, I would like to compile Kotlin code from string to string in JS using K2 or IR compiler And I would like to know if it is possible to compile each Kotlin file into a separate JS file with separate type definitions and source map.
It is not a problem for me to write a script that will run the compiler for each file. The problem is that if 2 kotlin files import one shared kotlin file, then the final 2 js files will have duplicated code.