plugins {
id("io.github.turansky.kfc.latest-tools") version "19.0.0"
}- Latest security updates
- Latest features
- Node, NPM - latest LTS
- NPM - package manager (instead of Yarn)
.kotlin-locks/- directory forpackage-lock.jsonfiles
- Webpack (+cli, +dev-server) - latest
- Mocha - latest
plugins {
id("io.github.turansky.kfc.application") version "19.0.0"
}- You need fast bundler - like Vite ;)
# gradle.properties
# default
kfc.platform=js
# WasmJS
kfc.platform=wasmjs
# Both (JS and WasmJS)
kfc.platform=web- Kotlin/JS
- Target
es2015 - Granularity
per-file- Default
- Required for lazy modules, workers, worklets support
whole-program- Set
kfc.per.file=falseto activate - Recommended for isolated single file applications
- Set
- Target
- Kotlin/WasmJS
- Target
es2015
- Target
You can add your custom vite.config.mjs (example) and other
configuration files in vite folder:
my-app/
src/jsMain/kotlin/
vite/
vite.config.mjs // custom Vite config
myscript.js // also will be copied
.env // main `.env` file
.env.development
.env.production
-
Add
index.htmlfile with module script to JS entrypoint (example) -
Specify custom config file with
roottokotlin(example) -
Start a dev server, run
jsViteDevtask (example)
Enable source maps generation:
kfc.source.maps=true