fixing web-app
This commit is contained in:
+19
-13
@@ -61,18 +61,19 @@ kotlin {
|
|||||||
port = 8080
|
port = 8080
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
testTask {
|
runTask {
|
||||||
// Disable browser tests due to ChromeHeadless permission issues
|
// Development optimizations
|
||||||
enabled = false
|
args.add("--mode=development")
|
||||||
|
//args.add("--optimization-minimize=false")
|
||||||
}
|
}
|
||||||
webpackTask {
|
webpackTask {
|
||||||
// Production optimizations
|
// Production optimizations
|
||||||
args.add("--mode=production")
|
args.add("--mode=production")
|
||||||
args.add("--optimization-minimize")
|
args.add("--optimization-minimize")
|
||||||
}
|
}
|
||||||
runTask {
|
testTask {
|
||||||
// Development optimizations
|
// Disable browser tests due to ChromeHeadless permission issues
|
||||||
args.add("--mode=development")
|
enabled = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -96,20 +97,25 @@ kotlin {
|
|||||||
enabled.set(true)
|
enabled.set(true)
|
||||||
}
|
}
|
||||||
// WASM-specific webpack optimizations handled by webpack.config.d files
|
// WASM-specific webpack optimizations handled by webpack.config.d files
|
||||||
|
devServer?.apply {
|
||||||
|
open = false
|
||||||
|
port = 8080
|
||||||
|
}
|
||||||
}
|
}
|
||||||
testTask {
|
runTask {
|
||||||
// Disable WASM browser tests due to environment issues
|
// Development optimizations for WASM
|
||||||
enabled = false
|
args.add("--mode=development")
|
||||||
|
//args.add("--optimization-minimize=false")
|
||||||
|
// Dev server settings handled by webpack.config.d/dev-server.js
|
||||||
}
|
}
|
||||||
webpackTask {
|
webpackTask {
|
||||||
// Production optimizations for WASM
|
// Production optimizations for WASM
|
||||||
args.add("--mode=production")
|
args.add("--mode=production")
|
||||||
args.add("--optimization-minimize")
|
args.add("--optimization-minimize")
|
||||||
}
|
}
|
||||||
runTask {
|
testTask {
|
||||||
// Development optimizations for WASM
|
// Disable WASM browser tests due to environment issues
|
||||||
args.add("--mode=development")
|
enabled = false
|
||||||
// Dev server settings handled by webpack.config.d/dev-server.js
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
-5
@@ -8,10 +8,5 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<canvas id="ComposeTarget"></canvas>
|
<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>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -1,16 +1,11 @@
|
|||||||
package at.mocode
|
package at.mocode
|
||||||
|
|
||||||
import androidx.compose.ui.ExperimentalComposeUiApi
|
import androidx.compose.ui.ExperimentalComposeUiApi
|
||||||
import androidx.compose.ui.window.ComposeViewport
|
import androidx.compose.ui.window.CanvasBasedWindow
|
||||||
import kotlinx.browser.document
|
|
||||||
|
|
||||||
@OptIn(ExperimentalComposeUiApi::class)
|
@OptIn(ExperimentalComposeUiApi::class)
|
||||||
fun main() {
|
fun main() {
|
||||||
|
CanvasBasedWindow(canvasElementId = "ComposeTarget") {
|
||||||
ComposeViewport(document.getElementById("ComposeTarget")!!) {
|
|
||||||
App()
|
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)
|
@OptIn(ExperimentalComposeUiApi::class)
|
||||||
fun main() {
|
fun main() {
|
||||||
|
|
||||||
// ComposeViewport(document.getElementById("ComposeTarget")!!) {
|
|
||||||
// App()
|
|
||||||
// }
|
|
||||||
|
|
||||||
CanvasBasedWindow(canvasElementId = "ComposeTarget") {
|
CanvasBasedWindow(canvasElementId = "ComposeTarget") {
|
||||||
App()
|
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
|
// Development server configuration with API proxy
|
||||||
// This forwards API requests from webpack-dev-server to the gateway
|
// This forwards API requests from webpack-dev-server to the gateway
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
if (config.mode !== 'production') {
|
if (config.mode !== 'production') {
|
||||||
config.devServer = {
|
config.devServer = {
|
||||||
@@ -33,7 +34,7 @@ if (config.mode !== 'production') {
|
|||||||
|
|
||||||
// Static files configuration
|
// Static files configuration
|
||||||
static: {
|
static: {
|
||||||
directory: 'src/commonMain/resources',
|
directory: path.resolve(__dirname, '../../build/dist/wasmJs/developmentExecutable'),
|
||||||
serveIndex: true,
|
serveIndex: true,
|
||||||
watch: true
|
watch: true
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,14 +1,13 @@
|
|||||||
// WASM Bundle Size Optimization Configuration
|
// WASM Bundle Size Optimization Configuration
|
||||||
// Advanced Webpack configuration for smaller WASM bundles
|
// Advanced Webpack configuration for smaller WASM bundles
|
||||||
|
//const path = require('path');
|
||||||
const path = require('path');
|
|
||||||
|
|
||||||
// Bundle size optimization configuration
|
// Bundle size optimization configuration
|
||||||
config.optimization = {
|
config.optimization = {
|
||||||
...(config.optimization || {}),
|
...(config.optimization || {}),
|
||||||
// Enable aggressive tree shaking
|
// Enable aggressive tree shaking
|
||||||
usedExports: true,
|
usedExports: true,
|
||||||
sideEffects: false,
|
sideEffects: true,
|
||||||
|
|
||||||
// Split chunks for better caching and smaller initial bundle
|
// Split chunks for better caching and smaller initial bundle
|
||||||
splitChunks: {
|
splitChunks: {
|
||||||
|
|||||||
Reference in New Issue
Block a user