Didier Villevalois
06/15/2026, 1:57 PM$rootDir/build/js/packages/... and sub-project/build/js/packages/.... Which are the correct ones to use if I have a local TS project that need them? It seems that npm-publish uses the ones in the sub-projects, but the kotlin { js { packageJson {} } } directives are modifying the ones in the root build directory.Edoardo Luppi
06/15/2026, 2:20 PMdistribution {
val rootDir = rootProject.layout.projectDirectory
val generatedPackageDir = rootDir.dir("generated-packages/${project.name}")
outputDirectory.set(generatedPackageDir)
}Artem Kobzar
06/15/2026, 2:22 PMsub-project/build/dist/js/productionLibrary or sub-project/build/dist/js/developmentLibrary (especially with npm-workspaces).
But to do so, you need to have binary.library() inside of js block of your sub-project (and call task jsBrowserProductionLibraryDistribution or jsBrowserDevelopmentLibraryDistribution to build those distributions)
Like here: https://github.com/Kotlin/kmp-logic-sharing-simple-example/blob/main/package.json
But it's what we do in the educational examples, I believe @Edoardo Luppi way is more production-readyDidier Villevalois
06/15/2026, 2:24 PM