Kotlin / kotlin-frontend-plugin

Gradle Kotlin (http://kotlinlang.org) plugin for frontend development
Apache License 2.0
563 stars 69 forks source link

Add a KotlinJS JAR as a NPM dependency #155

Open darren-bell-nanthealth opened 5 years ago

darren-bell-nanthealth commented 5 years ago

The Kotlin Multiplatform Plugin generates JsJars. Unfortunately, there doesn't seem to be a straight forward way to reference that as an NPM dependency in the plugin. Something like: kotlinFrontend { sourceMaps = true npm { dependency(":common") } } There is another plugin https://github.com/svok/kotlin-jar2npm-plugin that looks like it should work. However, it seems to clash with the Multiplatform plugin. Is there an alternative? Is there a way to reference the output? Something like: kotlinFrontend { sourceMaps = true npm { dependency("file:../common/build/classes/js/main") } I'm a bit stuck with this at the moment, any help would be gratefully recieved.

Thanks