From 6604addbacaf3522960b45eb86bcbe6fe5ecd8dc Mon Sep 17 00:00:00 2001 From: Oleksandr Karpovich Date: Wed, 29 May 2024 10:35:17 +0200 Subject: [PATCH] ImageViewer: workaround k/wasm configuration cache issue KT-68614 (#4891) Added a workaround in ImageViewer for K/Wasm configuration cache issue https://youtrack.jetbrains.com/issue/KT-68614/Wasm.-KotlinWebpack-cannot-serialize-Gradle-script-object-references --- examples/imageviewer/webApp/build.gradle.kts | 21 ++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/examples/imageviewer/webApp/build.gradle.kts b/examples/imageviewer/webApp/build.gradle.kts index 4d3f358ddc..52f28985ef 100644 --- a/examples/imageviewer/webApp/build.gradle.kts +++ b/examples/imageviewer/webApp/build.gradle.kts @@ -26,16 +26,17 @@ kotlin { wasmJs { moduleName = "imageviewer" browser { - commonWebpackConfig { - devServer = (devServer ?: KotlinWebpackConfig.DevServer()).apply { - static = (static ?: mutableListOf()).apply { - // Serve sources to debug inside browser - add(rootDirPath) - add(rootDirPath + "/shared/") - add(rootDirPath + "/webApp/") - } - } - } + // TODO: uncomment when https://youtrack.jetbrains.com/issue/KT-68614 is fixed (it doesn't work with configuration cache) +// commonWebpackConfig { +// devServer = (devServer ?: KotlinWebpackConfig.DevServer()).apply { +// static = (static ?: mutableListOf()).apply { +// // Serve sources to debug inside browser +// add(rootDirPath) +// add(rootDirPath + "/shared/") +// add(rootDirPath + "/webApp/") +// } +// } +// } } binaries.executable() }