Ilya Tel
02/01/2023, 4:59 PM./gradlew -t run
everything works fine,
But when i do a ./gradlew clean zip
, then a certain part of my app breaks, with an undefined function (the function has a minimized name) message...
95% of the application works fine, but in one part, which in my opinion is no different from the rest, I get this error when I try to send a request
If I do a ./gradlew zip
everything works fine
Has anyone encountered this ?
I will most likely revert to using kvision-rest soon, but I also thought it would be helpful to get your input on the issue.
here's my build.gradle.kts
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig
plugins {
val kotlinVersion: String by System.getProperties()
kotlin("plugin.serialization") version kotlinVersion
kotlin("js") version kotlinVersion
val kvisionVersion: String by System.getProperties()
id("io.kvision") version kvisionVersion
}
version = "1.0.0-SNAPSHOT"
group = "com.example"
repositories {
mavenCentral()
mavenLocal()
}
// Versions
val kotlinVersion: String by System.getProperties()
val kvisionVersion: String by System.getProperties()
val ktor_version: String by project
val webDir = file("src/main/web")
kotlin {
js {
browser {
runTask {
outputFileName = "main.bundle.js"
sourceMaps = false
devServer = KotlinWebpackConfig.DevServer(
open = false,
port = 3000,
proxy = mutableMapOf(
"/kv/*" to "<http://localhost:8080>",
"/kvws/*" to mapOf("target" to "<ws://localhost:8080>", "ws" to true)
),
static = mutableListOf("$buildDir/processedResources/js/main")
)
}
webpackTask {
outputFileName = "main.bundle.js"
}
// testTask {
// useKarma {
// useChromeHeadless()
// }
// }
}
binaries.executable()
}
sourceSets["main"].dependencies {
implementation("io.kvision:kvision:$kvisionVersion")
implementation("io.kvision:kvision-bootstrap:$kvisionVersion")
implementation("io.kvision:kvision-i18n:$kvisionVersion")
implementation("io.kvision:kvision-routing-navigo-ng:$kvisionVersion")
implementation("io.kvision:kvision-state:$kvisionVersion")
implementation("io.kvision:kvision-toastify:$kvisionVersion")
implementation("io.kvision:kvision-imask:$kvisionVersion")
implementation("io.ktor:ktor-client-content-negotiation-js:$ktor_version")
implementation("io.ktor:ktor-serialization-kotlinx-json-js:$ktor_version")
}
sourceSets["test"].dependencies {
implementation(kotlin("test-js"))
implementation("io.kvision:kvision-testutils:$kvisionVersion")
}
sourceSets["main"].resources.srcDir(webDir)
}
Robert Jaros
02/01/2023, 5:03 PMIlya Tel
02/01/2023, 5:07 PMRobert Jaros
02/01/2023, 5:10 PMIlya Tel
02/01/2023, 5:13 PM