Fix the compiler arguments

This commit is contained in:
Username404-59 2021-06-20 15:20:32 +02:00 committed by Username404
parent 639bfd5a36
commit e0bdb8513e
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
2 changed files with 9 additions and 7 deletions

View File

@ -17,6 +17,15 @@ dependencies {
kotlin { kotlin {
js(IR) { js(IR) {
moduleName = "Username404_Website" moduleName = "Username404_Website"
compilations.all {
with(kotlinOptions) {
freeCompilerArgs = freeCompilerArgs + listOf(
"-Xopt-in=kotlin.RequiresOptIn",
"-Xopt-in=kotlin.js.ExperimentalJsExport",
"-progressive"
)
}
}
browser { browser {
webpackTask { webpackTask {
output.libraryTarget = "global" output.libraryTarget = "global"
@ -37,9 +46,3 @@ kotlin {
binaries.executable() binaries.executable()
} }
} }
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class) {
with(kotlinOptions) {
freeCompilerArgs = listOf("-Xopt-in=kotlin.RequiresOptIn", "-progressive")
}
}

View File

@ -1,4 +1,3 @@
@file:OptIn(ExperimentalJsExport::class)
package fr.username404.website package fr.username404.website
import kotlinx.browser.document import kotlinx.browser.document