<@U02AB5P2XU6> Just so happened that I stumbled up...
# kobweb
s
@David Herman Just so happened that I stumbled upon an old comment of yours on Reddit πŸ˜› https://www.reddit.com/r/Kotlin/comments/yt243j/comment/iw42fpa/?utm_source=share&amp;ut[…]m=web3x&amp;utm_name=web3xcss&amp;utm_term=1&amp;utm_content=share_button Just wanted to ask if you have any new information about it? Have there been any hot reloading improvements in Kotlin/JS since then? While developing the YouTube clone, I felt the same, didn't know others are facing it too.
r
You can save some reload time using HMR, but I don't know if it's supported by Kobweb. And disabling source maps is a must. There are also at least two projects working on using Vite instead of Webpack: https://gitlab.com/opensavvy/automation/kotlin-vite https://github.com/turansky/kfc-plugins
thank you color 1
d
A HUGE speedup we've seen since that comment was Gradle stabilized their configuration cache feature, and we made our Gradle plugins compatible as did the Kotlin Gradle Plugin teams.
πŸŽ‰ 1
I'm good friends with the OpenSavvy author btw (@CLOVIS), and you may want to join the #C078Z1QRHL3 channel too! You can see us engaging on this Kobweb issue about integrating Vite: https://github.com/varabyte/kobweb/issues/543
kodee happy 1
🀝 2
Never heard of KFC before. I'll have to check that one out.
c
The main difference between KFC and the Vite plugin is that the Vite plugin uses a Kotlin DSL to configure stuff in build.gradle.kts, whereas KFC uses regular JS ecosystem files like vite.config.mjs
πŸ‘ 1
There is a thread on this slack where Victor and I discuss the differences between the two projects but I don't remember where πŸ˜…
s
Wow! This is amazing πŸ‘ This is so much faster than the usual experience. Would absolutely LOVE to have this same experience with Kobweb πŸ™Œ
c
Hey that's my code! 😁
πŸ™Œ 1
s
@David Herman Can I just follow this in a new Kobweb project to get it to run with the Vite plugin? Or does it require some other configuration?
c
It should work. Just note though, the plugin is broken with Kotlin 2.0+ (the Kotlin team changed an API and won't fix it until 2.2 :/)
Last time we tested with Kobweb, we had a few weird things with images and static resources, so please do try and tell me what happens, hopefully we can fix it!
s
Absolutely. On it. Before it get on to it, I want to take a second and sincerely thank you and all other Kotlin contributors for keeping the community alive and kicking K
πŸ™ 1
thank you color 1
I always wished Kotlin mustn't die at Android alone It has great potential
c
...I was here before Kotlin was Android lol, I'm fullstack
s
LOL.. I'm severely late to the party then πŸ˜‚
c
But yeah, don't hesitate to look at https://OpenSavvy.dev and #C078Z1QRHL3, we have a lot of projects around KMP and KJS πŸ™‚
(and also checkout @Robert Jaros's #C06UAH52PA7, he also does a lot for the KJS ecosystem)
πŸ’― 2
s
That's awesome. Will make sure to check it all out K Thanks! And yes, I already know about Kilua, have already given it a little spin :)
c
Oh wow I didn't recognize you. I saw your posts about Kilua and Kobweb, thanks a lot! It's really nice to see we're being noticed K
☝️ 1
s
Oh wow I didn't recognize you.
The feeling is mutual! I thought the exact same thing as soon as I opened https://opensavvy.dev/ laugh cry face palm I've seen it multiple times before. Such a small world and an even smaller community K Surely hoping more and more devs see the power of Kotlin and self-invite themselves here πŸ™Œ Everyone's welcome.
K 1
c
Nice! Don't hesitate to create issues or get in touch, there are only two or three people that send feedback to me so it's really hard to know what I should focus on πŸ˜…
s
Oh absolutely! Vite for Kotlin has piqued my interest! I was recently looking into this new framework named https://nuejs.org/ and wondered if there's a way in Kotlin to have such fast hot reload times. Hence, this conversation started. Lol won't make this thread unnecessarily big now πŸ˜‚ Big thanks to David, Ivan, and Robert for your valuable time. Hoping to catch up soon 🌟 Till then, hail KT K ✊ πŸ˜‚
c
Also, the tracking for the broken Vite plugin is here, if you want to get updated when that's fixed: https://gitlab.com/opensavvy/automation/kotlin-vite/-/issues/55
thank you color 1
The Vite plugin reloads basically as fast as the Kotlin compiler compiles
⚑ 1
s
You were right @CLOVIS, I'm getting the warning in the image below and this error while running the gradle task:
Copy code
A problem occurred configuring project ':site'.
> Could not create task ':site:viteRun'.
   > 'org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin$Companion.getKotlinNodeJsExtension(org.gradle.api.Project)'
This is with both Kotlin versions
2.1.20
and
2.1.20-Beta2
So going back to Kotlin version
1.9.22
is the only solution for now in your understanding?