Skip to content

Commit

Permalink
Enable useEsClasses – from official docs
Browse files Browse the repository at this point in the history
  • Loading branch information
aerialist7 committed May 9, 2024
1 parent a0d1a8c commit 19d3b8d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import org.jetbrains.kotlin.gradle.tasks.Kotlin2JsCompile
import org.jetbrains.kotlin.gradle.dsl.KotlinJsCompile

plugins {
kotlin("multiplatform")
Expand Down Expand Up @@ -41,9 +41,10 @@ kotlin {
}
}

tasks.withType<Kotlin2JsCompile>().configureEach {
compilerOptions {
useEsClasses.set(true)
// From https://kotlinlang.org/docs/whatsnew19.html#experimental-support-for-es2015-classes-and-modules
tasks.withType<KotlinJsCompile>().configureEach {
kotlinOptions {
useEsClasses = true
}
}

Expand Down

0 comments on commit 19d3b8d

Please sign in to comment.