Compile kotlin code to both JVM and JavaScript

It is possible but you may face some difficulties. First of all you can build and configure it only with Maven: just setup both executions. The second issue is that IDE can't deal with multiple targets so you can use tricks to enable/disable stdlib/kotlin-js-library

You can see it at https://github.com/Kotlin/kotlinx.html

It is multimodule project.. Module jvm is only compiled for JVM, module js only to javascript, module shared to both

Notice maven profiles: when you edit shared module you can enable js or jvm but not both: otherwise IDE will go crazy. During compilation both profiles are active by default so you will get multitarget jar