Robert Jaros
05/25/2021, 11:20 AMbuild.gradle.kts
doesn't compile. What happened?Robert Jaros
05/25/2021, 11:21 AM* What went wrong:
Script compilation errors:
Line 35: proxy = mapOf(
^ Type mismatch: inferred type is Map<String, Any> but MutableMap<String, Any>? was expected
Line 39: contentBase = listOf("$buildDir/processedResources/js/main")
^ Type mismatch: inferred type is List<String> but MutableList<String>? was expected
2 errors
Robert Jaros
05/25/2021, 11:21 AMRobert Jaros
05/25/2021, 11:21 AMRobert Jaros
05/25/2021, 11:23 AMdevServer = KotlinWebpackConfig.DevServer(
open = false,
port = 3000,
proxy = mapOf(
"/kv/*" to "<http://localhost:8080>",
"/kvws/*" to mapOf("target" to "<ws://localhost:8080>", "ws" to true)
),
contentBase = listOf("$buildDir/processedResources/js/main")
)
Robert Jaros
05/25/2021, 11:24 AMproxy
and contentBase
options.christophsturm
05/25/2021, 11:24 AMrusshwolf
05/25/2021, 11:25 AMrusshwolf
05/25/2021, 11:25 AMchristophsturm
05/25/2021, 11:26 AMchristophsturm
05/25/2021, 11:26 AMconfig.devServer = Object.assign(
{},
config.devServer || {},
{
port: 3000,
proxy: {
'/api': {
target: '<http://localhost:8080>',
logLevel: 'debug'
}
}
}
)
Robert Jaros
05/25/2021, 11:26 AMRobert Jaros
05/25/2021, 11:27 AM@Suppress("unused")
turansky
05/25/2021, 11:28 AMRobert Jaros
05/25/2021, 11:29 AMturansky
05/25/2021, 11:33 AMturansky
05/25/2021, 11:33 AMturansky
05/25/2021, 11:36 AMturansky
05/25/2021, 11:40 AMturansky
05/25/2021, 11:43 AMstatic
parameter configuration. Unexisted folder declaredRobert Jaros
05/25/2021, 11:46 AMcontentBase = listOf(...)
with static = mutableListOf(...)
in my build.gradle.kts and it should work again with new dev server version?Robert Jaros
05/25/2021, 11:48 AMturansky
05/25/2021, 11:59 AMturansky
05/25/2021, 12:01 PM1.5.10
- second step of migration to Webpack 5, but not final. Dev server API isn’t stable