kotlin-hands-on / web-app-react-kotlin-js-gradle

https://play.kotlinlang.org/hands-on/Building%20Web%20Applications%20with%20React%20and%20Kotlin%20JS/
135 stars 115 forks source link

This tutorial is not compatible with kotlin-wrappers-bom:1.0.0-pre.430+ #42

Open tokuhirom opened 3 months ago

tokuhirom commented 3 months ago

Current version of this tutorial depends on kotlin-wrappers-bom:1.0.0-pre.430. https://github.com/kotlin-hands-on/web-app-react-kotlin-js-gradle/blob/finished/build.gradle.kts#L28

But the latest version is kotlin-wrappers-bom:1.0.0-pre.750. I want to use the recent version of the module.

but kotlin-wrappers introduce following patch between 1.0.0-pre.430 and 1.0.0-pre.431. https://github.com/JetBrains/kotlin-wrappers/commit/e7d01b1f03fb795429003c4d0037ddf73d768115

As a result, this tutorial can't compile with the latest kotlin-wrappers-bom:1.0.0-pre.750.

Type mismatch: inferred type is org.w3c.dom.Element but web.dom.Element was expected
tokuhirom commented 3 months ago

If my understanding is correct, use import web.dom.document instead of import kotlinx.browser.document resolve the issue.