hey, short question :slightly_smiling_face: when i...
# multiplatform
c
hey, short question 🙂 when i want to publish a kmp lib for js target, is the binaries.library() needed and what is it there for?
Copy code
kotlin {
    js {
        nodejs()
        browser()
        binaries.library()
    }
👀 1
🚫 1
c
That will actually build the native binaries. In the case of JS the
.js
files. If it is a native target the
.so
files and so on. https://kotlinlang.org/docs/multiplatform-build-native-binaries.html
a
@Christian Dräger no, you don't need it for klib. As far as I remember, it was created for generating JS libraries, which means that the generated JS file will not be processed by WebPack. But I'm not sure; @Ilya Goncharov [JB] could you please share more about it?
c
thx for qucik response. since i just want a klib i will remove it 🙂
j
Unless you're varying your behavior between Node and the browser, I would not bother testing both.
👍 1