Soo, after a lot of digging into the compiler I’ve...
# javascript
m
Soo, after a lot of digging into the compiler I’ve found a way to make code splitting work in a proof of concept 🎉 The
-Xir-per-module
compiler flag was pretty helpful here. I wonder how stable it is? Tomorrow I’ll try to incorporate the approach into my Kotlin React app and see if it works there as expected too :) Update: Works like a charm in my Kotlin React project 🙂 https://github.com/fluidsonic/kjs-chunks
👀 1
1
👍 7
z
what exactly is code splitting?
if its what i think it is, that is super helpful
y
Is there a way to implement this code splitting in Kotlin multiplatform project? it seems that I can't add modules under jsMain in a trivial way.
m
@Yardenavirav I’m not sure what you mean. It shouldn’t matter if it’s a multiplatform project or not. My web project depends on multiplatform subprojects for example. What do you mean by “can’t add modules under jsMain in a trivial way”?