Skip to content

fluidsonic/kjs-chunks

Repository files navigation

Code splitting for Kotlin/JS browser apps

This is a rough proof-of-concept that a Kotlin/JS browser app can be split into multiple chunks that can depend on each other dynamically. For example a Kotlin React app could be split into multiple smaller JS files that way.

Architecture

Modules

Configuration

Known limitations

  • Only works with the JS IR compiler.
  • The setup is fragile and can break with subsequent Kotlin updates.
  • Dynamic imports have unstable names (like kotlin_kjs_chunks_dynamic in this example).
  • @EagerInitialization must be used as a workaround to execute logic when loading a module, e.g. the index.

About

Code splitting for Kotlin/JS browser apps

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published