Anyone know of a good guide for accessing KMP shared lib from a non-Kotlin JS app? Bonus if it covers publishing.
c
chrisjenx
06/24/2024, 4:08 PM
Don't know of a guide, but my guess would be provide the bundled
.js
files that your lib builds.
Publishing would be tricky as I don't think there is a Gradle Yarn Publishing plugin. But you could probably create a Gradle Task to upload the file manually.
I don't however know if KMP will export things like yarn/node files to also upload...
chrisjenx
06/24/2024, 4:08 PM
tbh, if it's just for you and not public, I would be lazy and just add the js files to github releases/repo etc
👍 1
n
Nestor Ledon
06/24/2024, 4:41 PM
Ahh okay. I'm starting to see the light. I have a compose project but that only generates composeApp.js. Running
jsBrowserProductionWebpack
on my
shared
lib does generate a
shared.js
that exposes my methods.
c
chrisjenx
06/24/2024, 4:56 PM
yeah, I've not tried, but yeah it normally generates what you "need" in outputs... etc