sort of tangential question: with our current setu...
# javascript
p
sort of tangential question: with our current setup, we have a kotlin multiplatform library that is in its own repo and consumed by clients in separate repos. specifically for our react client, i'd like to set up an
npm link
for local development. i've been trying to poke around and see which task and output i should be using. is using the
compileDevelopmentLibraryKotlinJs
and running
npm link
in
build/js/packages/<my-module>
correct? it seems there is also a
build/compileSync/js/main/developmentLibrary/kotlin
directory, but this doesn't seem to have a
package.json
🧵 1
e
You need to link to the output of the library distribution task. Each target (nodejs, browser), has a
distribution
block that you can use to customize the output directory
p
gotcha, but is the task (
compileDevelopmentLibraryKotlinJs
) correct?
e
No, that is only related to Kotlin metadata. The actual JS distribution is outputted with tasks such as
jsBrowserProductionLibraryDistribution
p
i see gotcha
thanks!
✔️ 1
ahh i see and now this creates a library in
build/dist/js/developmentLibrary
?
this roughly looks like the same output as the other task - with two more gradle tasks run after:
Copy code
> Task :jsBrowserDevelopmentLibraryPrepare
> Task :jsBrowserDevelopmentLibraryDistribution
i guess i'll have to dig into what these tasks are doing
e
The production distribution may apply additional optimizations to the final package. But I don't recall which ones