Damien O'Hara
12/02/2022, 8:42 AMSam Gammon
12/02/2022, 8:42 AMSam Gammon
12/02/2022, 8:43 AMSam Gammon
12/02/2022, 8:43 AMDamien O'Hara
12/02/2022, 8:46 AM> Task :frontend:nodeProductionRun FAILED
val target = document.getElementById("root")
^
ReferenceError: document is not defined
any idea with this one? it seems fine in the IDE but won't build with :frontend:runSam Gammon
12/02/2022, 8:46 AMdocument
, is there?Damien O'Hara
12/02/2022, 8:47 AMimport kotlinx.browser.document
and it resolves correctly in the IDEDamien O'Hara
12/02/2022, 8:47 AMSam Gammon
12/02/2022, 8:47 AMimplementation(libs.kotlinx.wrappers.browser)
in that frontend
module?Sam Gammon
12/02/2022, 8:47 AMSam Gammon
12/02/2022, 8:47 AMSam Gammon
12/02/2022, 8:48 AMfrontend:nodeProductionRun
Sam Gammon
12/02/2022, 8:48 AMSam Gammon
12/02/2022, 8:48 AMfrontend:browserProductionRun
Sam Gammon
12/02/2022, 8:48 AMbuild.gradle.kts
for :frontend
?Sam Gammon
12/02/2022, 8:48 AMDamien O'Hara
12/02/2022, 8:48 AMval elideVersion = "1.0-v3-alpha1-rc38"
plugins {
kotlin("js") version "1.7.21"
id("dev.elide.buildtools.plugin") version "1.0.0-beta12"
}
group = "io.koalaql"
version = "1.0-SNAPSHOT"
kotlin {
js(IR) {
binaries.executable()
browser {
commonWebpackConfig {
sourceMaps = false
cssSupport.enabled = true
org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig.Mode.DEVELOPMENT
}
}
}
}
dependencies {
implementation("dev.elide:base:$elideVersion")
implementation(kotlin("stdlib-js"))
implementation(libs.kotlinx.wrappers.browser)
implementation(libs.kotlinx.wrappers.react)
implementation(libs.kotlinx.wrappers.react.dom)
}
Damien O'Hara
12/02/2022, 8:48 AMSam Gammon
12/02/2022, 8:48 AMSam Gammon
12/02/2022, 8:48 AMkotlin {
js(IR) {
browser {
binaries.executable()
Sam Gammon
12/02/2022, 8:49 AMbinaries
should be inside browser
Sam Gammon
12/02/2022, 8:49 AMDamien O'Hara
12/02/2022, 8:49 AMSam Gammon
12/02/2022, 8:49 AMSam Gammon
12/02/2022, 8:49 AMSam Gammon
12/02/2022, 8:49 AMDamien O'Hara
12/02/2022, 8:49 AMSam Gammon
12/02/2022, 8:49 AMDamien O'Hara
12/02/2022, 8:49 AMSam Gammon
12/02/2022, 8:49 AMSam Gammon
12/02/2022, 8:49 AM