Gradle script for building compat (js/wasm) bundle of the Compose Multiplatform web app based on client wasm GC availability with single entry point and resources.
Tasks
compatBrowserProductionDistribution
compatBrowserDevelopmentDistribution
are used to generate a compat bundle to the build/dist/compat
directory.
Task
- Assembles js and wasm distributables
- Merges two distributables to the single bundle
- Appends wasmGC detection script to the
index.html
- Appends hashes for script files to avoid browser caching
https://github.com/GoogleChromeLabs/wasm-feature-detect is used to detect wasmGC feature.
To run locally default jsBrowserRun
and wasmJsBrowserRun
tasks can be used. Script will automatically add required js files to the index.html