Perhaps, but you may encounter some difficulties. First of all, you can only create and customize it using Maven: just tweak both executions. The second problem is that the IDE cannot deal with multiple goals, so you can use tricks to turn stdlib / kotlin-js-library on / off
You can see it at https://github.com/Kotlin/kotlinx.html
This is a multi-module project. The jvm module is compiled for JVM only, the js module is for javascript only, a module common to both
Pay attention to maven profiles: when editing a general module, you can enable js or jvm, but not both: otherwise the IDE will go crazy. During compilation, both profiles are active by default, so you will get a multi-charge jar
source share