Hello. I'm trying to use Swiper library in my Kotlin JS project, but I run into issue where its comp...
r
Hello. I'm trying to use Swiper library in my Kotlin JS project, but I run into issue where its component is called "swiper-container", but using - is not possible in JS naming like in screenshow How can I achieve my goal? There is a Swiper docs with example: https://swiperjs.com/element
a
Hey there. Could you try to add the next lines into your `build.gradle.kts`:
Copy code
tasks.withType<KotlinJsCompile>().configureEach {
   kotlinOptions.freeCompilerArgs += "-XXLanguage:+JsAllowInvalidCharsIdentifiersEscaping"
}
@Rafał Kuźmiński ^^
r
It didn't help. I tested it with Kotlin 1.8 and Legacy backend
a
Oh, it doesn't work with the Legacy backend. Only the IR backend supports those kind of identifiers, sorry sad panda
b
You're confusing swiper custom html components with js code. In fact, looking at their docs, they don't expose ANY js API at all.