Joffrey
06/19/2019, 9:52 PMsnrostov
06/20/2019, 8:02 AMbuild.gradle file:
kotlin {
js { // for single platform project use "target { }" section
nodejs()
browser()
}
}
Also you can add npm in dependencies section of source sets, for example:
kotlin {
sourceSets["main"].dependencies {
implementation(kotlin("stdlib-js"))
implementation(npm("react", "16.8.3"))
}
}Joffrey
06/20/2019, 9:51 AMdependencies block, but got an error about the npm function. Thanks for the tip, I'll try that.snrostov
06/20/2019, 10:55 AMdependencies, not in project dependencies section.