fixing web-app

This commit is contained in:
stefan
2025-09-17 15:03:54 +02:00
parent 253c01398f
commit 9204163120
6 changed files with 63 additions and 3 deletions
+47
View File
@@ -0,0 +1,47 @@
// Development server configuration with API proxy
// This forwards API requests from webpack-dev-server to the gateway
if (config.mode !== 'production') {
config.devServer = {
...config.devServer,
// Proxy API requests to the gateway - using modern object syntax
proxy: {
'/api/**': {
target: 'http://localhost:8081',
changeOrigin: true,
secure: false,
logLevel: 'debug',
pathRewrite: {
'^/api': '/api' // Keep the /api prefix for gateway routing
}
}
},
// Disable all caches as requested in previous issue
headers: {
'Cache-Control': 'no-cache, no-store, must-revalidate',
'Pragma': 'no-cache',
'Expires': '0'
},
// Development middleware settings
devMiddleware: {
writeToDisk: false,
stats: 'minimal'
},
// Static files configuration
static: {
directory: 'src/commonMain/resources',
serveIndex: true,
watch: true
},
// CORS settings for development
allowedHosts: 'all',
historyApiFallback: true,
hot: true,
liveReload: true
};
}
+2 -2
View File
@@ -57,8 +57,8 @@ config.optimization = {
}
},
// Minimize bundle size
minimize: true
// Minimize bundle size - conditional based on mode
minimize: config.mode === 'production'
// Note: minimizer is automatically configured by Kotlin/JS
};