Comments (2)
Would it be possible to leave this issue open for now?
I'll try to come back you with a sample project.
I gave it another look and realised, that the issue I have might be related to the fact that the result of the KMM project ( the js library) is used inside a react native application.
We were not able to reproduce the issue running the js library on node.
from canard.
Do you have a reproducer?
I have no issue with the following configuration (KMP full stack project JVM + JS)
kotlin {
jvm {
compilations.all {
kotlinOptions.jvmTarget = "1.8"
}
withJava()
testRuns["test"].executionTask.configure {
useJUnitPlatform()
}
}
js(IR) {
binaries.executable()
browser {
commonWebpackConfig {
cssSupport.enabled = true
}
}
}
sourceSets {
val commonMain by getting {
dependencies {
implementation("org.kodein.log:canard:0.16.0")
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
}
}
val jvmMain by getting {
dependencies {
implementation("io.ktor:ktor-server-netty:2.0.2")
implementation("io.ktor:ktor-server-html-builder-jvm:2.0.2")
implementation("org.jetbrains.kotlinx:kotlinx-html-jvm:0.7.2")
}
}
val jvmTest by getting
val jsMain by getting {
dependencies {
implementation("org.jetbrains.kotlin-wrappers:kotlin-react:18.2.0-pre.346")
implementation("org.jetbrains.kotlin-wrappers:kotlin-react-dom:18.2.0-pre.346")
implementation("org.jetbrains.kotlin-wrappers:kotlin-emotion:11.9.3-pre.346")
}
}
val jsTest by getting
}
}
In commonMain
I have:
val commonLogger = LoggerFactory.default.newLogger(Logger.Tag("Canard", "Common"))
in jsMain
I have:
val jsLogger = LoggerFactory.default.newLogger(Logger.Tag("Canard", "JS"))
fun main() {
commonLogger.info { "Common Logger says hello in JS!" }
jsLogger.info { "KJS Logger says hello!" }
val container = document.createElement("div")
document.body!!.appendChild(container)
val welcome = Welcome.create {
name = "Kotlin/JS"
}
createRoot(container).render(welcome)
}
from canard.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from canard.