fixing web-app
This commit is contained in:
+19
-13
@@ -61,18 +61,19 @@ kotlin {
|
||||
port = 8080
|
||||
}
|
||||
}
|
||||
testTask {
|
||||
// Disable browser tests due to ChromeHeadless permission issues
|
||||
enabled = false
|
||||
runTask {
|
||||
// Development optimizations
|
||||
args.add("--mode=development")
|
||||
//args.add("--optimization-minimize=false")
|
||||
}
|
||||
webpackTask {
|
||||
// Production optimizations
|
||||
args.add("--mode=production")
|
||||
args.add("--optimization-minimize")
|
||||
}
|
||||
runTask {
|
||||
// Development optimizations
|
||||
args.add("--mode=development")
|
||||
testTask {
|
||||
// Disable browser tests due to ChromeHeadless permission issues
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,20 +97,25 @@ kotlin {
|
||||
enabled.set(true)
|
||||
}
|
||||
// WASM-specific webpack optimizations handled by webpack.config.d files
|
||||
devServer?.apply {
|
||||
open = false
|
||||
port = 8080
|
||||
}
|
||||
testTask {
|
||||
// Disable WASM browser tests due to environment issues
|
||||
enabled = false
|
||||
}
|
||||
runTask {
|
||||
// Development optimizations for WASM
|
||||
args.add("--mode=development")
|
||||
//args.add("--optimization-minimize=false")
|
||||
// Dev server settings handled by webpack.config.d/dev-server.js
|
||||
}
|
||||
webpackTask {
|
||||
// Production optimizations for WASM
|
||||
args.add("--mode=production")
|
||||
args.add("--optimization-minimize")
|
||||
}
|
||||
runTask {
|
||||
// Development optimizations for WASM
|
||||
args.add("--mode=development")
|
||||
// Dev server settings handled by webpack.config.d/dev-server.js
|
||||
testTask {
|
||||
// Disable WASM browser tests due to environment issues
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-5
@@ -8,10 +8,5 @@
|
||||
</head>
|
||||
<body>
|
||||
<canvas id="ComposeTarget"></canvas>
|
||||
|
||||
<script type="application/javascript" src="meldestelle-wasm-vendors.js"></script>
|
||||
<script type="application/javascript" src="meldestelle-wasm-kotlin-stdlib.js"></script>
|
||||
<script type="application/javascript" src="meldestelle-wasm.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,16 +1,11 @@
|
||||
package at.mocode
|
||||
|
||||
import androidx.compose.ui.ExperimentalComposeUiApi
|
||||
import androidx.compose.ui.window.ComposeViewport
|
||||
import kotlinx.browser.document
|
||||
import androidx.compose.ui.window.CanvasBasedWindow
|
||||
|
||||
@OptIn(ExperimentalComposeUiApi::class)
|
||||
fun main() {
|
||||
|
||||
ComposeViewport(document.getElementById("ComposeTarget")!!) {
|
||||
CanvasBasedWindow(canvasElementId = "ComposeTarget") {
|
||||
App()
|
||||
}
|
||||
// CanvasBasedWindow(canvasElementId = "ComposeTarget") {
|
||||
// App()
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Meldestelle</title>
|
||||
<link type="text/css" rel="stylesheet" href="styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="ComposeTarget"></div>
|
||||
|
||||
<script type="application/javascript" src="meldestelle-wasm-vendors.js"></script>
|
||||
<script type="application/javascript" src="meldestelle-wasm-kotlin-stdlib.js"></script>
|
||||
<script type="application/javascript" src="meldestelle-wasm.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,11 +5,6 @@ import androidx.compose.ui.window.CanvasBasedWindow
|
||||
|
||||
@OptIn(ExperimentalComposeUiApi::class)
|
||||
fun main() {
|
||||
|
||||
// ComposeViewport(document.getElementById("ComposeTarget")!!) {
|
||||
// App()
|
||||
// }
|
||||
|
||||
CanvasBasedWindow(canvasElementId = "ComposeTarget") {
|
||||
App()
|
||||
}
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
html, body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
// Development server configuration with API proxy
|
||||
// This forwards API requests from webpack-dev-server to the gateway
|
||||
const path = require('path');
|
||||
|
||||
if (config.mode !== 'production') {
|
||||
config.devServer = {
|
||||
@@ -33,7 +34,7 @@ if (config.mode !== 'production') {
|
||||
|
||||
// Static files configuration
|
||||
static: {
|
||||
directory: 'src/commonMain/resources',
|
||||
directory: path.resolve(__dirname, '../../build/dist/wasmJs/developmentExecutable'),
|
||||
serveIndex: true,
|
||||
watch: true
|
||||
},
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
// WASM Bundle Size Optimization Configuration
|
||||
// Advanced Webpack configuration for smaller WASM bundles
|
||||
|
||||
const path = require('path');
|
||||
//const path = require('path');
|
||||
|
||||
// Bundle size optimization configuration
|
||||
config.optimization = {
|
||||
...(config.optimization || {}),
|
||||
// Enable aggressive tree shaking
|
||||
usedExports: true,
|
||||
sideEffects: false,
|
||||
sideEffects: true,
|
||||
|
||||
// Split chunks for better caching and smaller initial bundle
|
||||
splitChunks: {
|
||||
|
||||
Reference in New Issue
Block a user