KO

Kotlin/JS Build

Compilation and bundling for Kotlin/JS

Details

Language / Topic
kotlin-jsKotlin/JS
Category
Tooling

Rules

balanced
- Use Kotlin/JS IR compiler for smaller output and better dead code elimination.
- Use `webpack` or `esbuild` integration via Gradle for production bundling.
- Configure `kotlin { js { browser() } }` in `build.gradle.kts` — use `kotlin-wrappers` for React/TypeScript interop.
- Use `dukat` to auto-generate external declarations from TypeScript `.d.ts` files.
- Use `browserTest` and `nodeTest` tasks to test in both environments.