Closed fwilhe2 closed 2 years ago
While waiting for 0.7.3
to be published, here's a (horrible) hack in Gradle that "fixes" the issue:
tasks.withType<org.jetbrains.kotlin.gradle.tasks.Kotlin2JsCompile> {
doLast {
val content = outputFile.readText()
outputFile.writer().buffered().use {
it.write("if (typeof(HTMLLegendElement) == 'undefined') HTMLLegendElement = {};\n")
it.write(content)
}
}
}
Any update on this?
I don't see this issue anymore after updating 0.7.2 -> 0.7.5 release
I don't see this issue anymore after updating 0.7.2 -> 0.7.5 release
Thanks for the hint, I could verify this in my reproducer
Hi,
I've tried creating some html in a Kotlin Multiplatform project. Jvm and JS (Browser) seems to work well, but I've got some error in nodejs (12) which seems like a bug to me. Kotlin 1.4, Gradle 6.6,
org.jetbrains.kotlinx:kotlinx-html-js:0.7.2
, project generated via IntelliJ.src/commonMain/kotlin/demo.kt
:src/jsMain/kotlin/main.kt
:The html generator code should work both on jvm and js, thus I've put it into
commonMain
. In the actual project I've got both dependencies for jvm and js ofkotlinx.html
.I've pushed a minimal reproducer here https://github.com/fwilhe2/node-kotlin-html-repro
Run
./gradlew jsNodeRun --info
to reproduce (also see the gh actions workflow in the repo)Error:
Did I mess up the config, or is this a bug?