It seems that the bundle size has increased a bit ...
# kobweb
a
It seems that the bundle size has increased a bit after upgrading from
0.19.0
to
0.19.1
(and Kotlin from
2.0.10
to
2.0.20
) Before: 3,384,171 bytes (3.5 MB on disk) After: 3,587,072 bytes (3.7 MB on disk) The compiler target is already
es2015
for both. No dependencies except Kobweb and Compose HTML Core/Runtime. Nothing has changed except the version for
kobweb
and
kotlin
While the assets on this site took most of the space, the same issue also happened on the example site. (I haven't changed them in this change)
d
I heard there was a downgrade for the
es2015
target for people accompanyhing the Kotlin
2.0.20
release unfortunately. But I think the non
es2015
target wasn't as affected?
👍 1
Note that changing the
kotlin
version is a pretty significant change. It's more than just the language / compiler, it also affects the version of the Kotlin multiplatform plugin and all of the dependencies (like Compose artifacts) that it bundles.
👍 1
e
Could you try switching back to
languageVersion
KOTLIN_1_9
? That goes back to compiling with K1. I'm curious to see if that restores the previous output size.
👍 1
a
The bundle size is about 4.2 MB for non
es2015
target with latest version of kotlin
Actually it did restore the previous output size when switching to older version of Kotlin and Kobweb.
👀 1
e
Did you try setting the language version, or did you rollback the dependency itself?
a
I haven't tried using Kotlin 1.9 with Kobweb 0.19.0, the issue with Kotlin itself, most people saw decrease in the bundle size after using Kotlin 2.0.10, not sure why I'm the only one who saw the opposite, even when using the default app template so it's not a project configuration issue
e
I didn't want you to downgrade the dependency version, just the language version via compiler options
a
By dependency version, do you mean Kotlin?
e
Yes. Keep using 2.0.20 and latest Kobweb. But set the language version to 1.9
a
I will try ASAP
e
The K2 JS IR seem to have multiple issues. Just a word of caution, and I'm curious to check how @David Herman does it, but on K2 debugging is completely off on Windows.
Probably David is on Linux or macOS
a
I'm on macOS and also tried it with Linux (haven't saw the bundle size though).
d
Just a word of caution, and I'm curious to check how @David Herman does it, but on K2 debugging is completely off on Windows.
Ah yeah I'm not debugging stuff personally. I mostly use println plus live relading for my developer workflow.
👍 1
I had no idea about the source maps issue, thanks for putting it on my radar.