Hi y'all, I'm new to both Kotlin and KotlinJS. I h...
# javascript
m
Hi y'all, I'm new to both Kotlin and KotlinJS. I have the simplest project set up, and am having an issue with the webpack dev server. When I run it with
gradlew run --continuous
, it seems to work as it should - I can make a code change, and then refresh the browser and see that change. However - if there's a compiler error at any point, it never recovers. So if I make a code change that's bogus (but don't realize it) and then save my changes, I have to kill the dev server and start over.
r
m
I'm not sure if this is the same problem. My issue is that, if there ever is a legitimate compiler error during a hot-reload cycle, fixing that error does not allow the hot-reload cycle to work again.
r
I think this should help with your problem:
Copy code
config.devServer.watchOptions = {
        aggregateTimeout: 300,
        poll: 300
    };
m
Thanks - I'll see if it helps!
r
but then you will probably hit this issue (unless you are already on kotlin 1.4)
m
Should I be on kotlin 1.4? I'm new to both Kotlin and Kotlin/JS. I'm coming from Scala and ScalaJS and am/was intrigued by the fact that there was a react project mentioned right on the Kotlin website.... Was hoping that implied that this was a more mature and mainstream (Kotlin/JS-React) platform than doing the same with Scala. I wonder if that's actually the case!
r
It's difficult question 🙂
Kotlin 1.4 will bring a lot of changes to the platform, and will be released in the near future.
m
Okay, good to know! I wonder if I'm here just a few months too early! haha
Thank you.
r
It's never too early to move from Scala to Kotlin ;-)
m
Well, I've been using Scala for about 9 years now but am cringing at the idea of having new hires have to learn it. Meanwhile Kotlin seems to have most of what makes Scala nice, while also seeming a bit easier to learn. Not to mention that Kotlin is gaining in popularity while Scala is definitely not!