just tried out the Compose Multiplatform for Web compose version of image viewer.
Running it with gradle webAppwasmBrowserRun works great.
But how would a "distributable/deployable" look like?
Will there be a single .jar like .wasm archive file? can I open that one in my browser and the app starts?
how would a web-server "serve" the distributable/deployable wasm thingy?
I did not find any documentation for kotlin on this.
o
Oleksandr Karpovich [JB]
05/02/2023, 9:42 AM
wasmBrowserProductionWebpack
would create a production distribution in …/webApp/build/dist/wasm/productionExecutable
Unfortunately, there is still a bug that productionExecutable misses one of the files. It can be added manually from: …/webApp/build/compileSync/wasm/main/productionExecutable/kotlin/imageviewer.uninstantiated.mjs
Then this distribution (
productionExecutable
) can be uploaded to the cloud (some hosting) to make it publicly available. For example, https://pages.github.com/
Or to run on localhost:
python -m http.server
in the productionExecutable directory. Then the app should be available at localhost:8000 (the port can be different)