Reputation: 11
After gradle wasmJsBrowserDistribution command,I uploaded the files contained in the composeApp/build/dist/wasmJs/productionExecutable folder on my Aruba server but the page is completely white, I only see the favicon.ico and the correct name. I think something is missing, I know we are still in the early stages with compose-web but during the run everything works perfectly.
My main is:
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.window.ComposeViewport
import kotlinx.browser.document
@OptIn(ExperimentalComposeUiApi::class)
fun main() {
ComposeViewport(document.body!!) {
App()
}
}
My index.html is:
<!DOCTYPE html>
<html lang="it-IT">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>my new site</title>
<link rel="icon" type="image/x-icon" href="composeResources/web_jkd_compose.composeapp.generated.resources/drawable/favicon.ico">
<link type="text/css" rel="stylesheet" href="styles.css">
<script type="application/javascript" src="composeApp.js"></script>
</head>
<body>
</body>
</html>
Can someone please help me understand what I'm doing wrong?
SOLVED: the problem was that Aruba server need to setup the file .htaccess adding this: AddType application/wasm .wasm .Partially solved because the site is visible in chrome and not in firefox, I'm searching for MIME type error in firefox. If someone has solutions about this mime type error please let me know.
Upvotes: 1
Views: 152