rjaros / kilua

Composable web framework for Kotlin/Wasm and Kotlin/JS
https://kilua.dev
MIT License
124 stars 5 forks source link

Can we output libraries instead of websites ? #9

Open ahna92 opened 1 month ago

ahna92 commented 1 month ago

Can kilua output a node js library for example, that can be integrated seamlessly with react website ? so the library will be like basic components

Understand the complexity , just checking :D

Sorry not an issue, but there was no discussion tab

rjaros commented 1 month ago

Do you mean something like creating a web component?

ahna92 commented 1 month ago

@rjaros yes

rjaros commented 3 weeks ago

Sorry for the long response time. I haven't tried that yet, but in theory it should be possible. You can initialize a root container using a custom HTML element. The problem I see is the bundle size because every single component would probably need to use its own copy of Kotlin stdlib. I'm not sure if it is possible to share it between different components.