[Gradle, JS] Use overlay with false warnings

Merge-request: KT-MR-6343
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>

^KT-51527 fixed
This commit is contained in:
Ilya Goncharov
2022-05-30 11:36:52 +00:00
committed by Space
parent 3630d7f770
commit 0b9e5e14be
3 changed files with 26 additions and 4 deletions
@@ -117,7 +117,13 @@ open class KotlinBrowserJsIr @Inject constructor(target: KotlinJsIrTarget) :
{
task.devServer = KotlinWebpackConfig.DevServer(
open = true,
static = mutableListOf(compilation.output.resourcesDir.canonicalPath)
static = mutableListOf(compilation.output.resourcesDir.canonicalPath),
client = KotlinWebpackConfig.DevServer.Client(
KotlinWebpackConfig.DevServer.Client.Overlay(
errors = true,
warnings = false
)
)
)
},
{
@@ -157,7 +157,13 @@ open class KotlinBrowserJs @Inject constructor(target: KotlinJsTarget) :
{
task.devServer = KotlinWebpackConfig.DevServer(
open = true,
static = mutableListOf(compilation.output.resourcesDir.canonicalPath)
static = mutableListOf(compilation.output.resourcesDir.canonicalPath),
client = KotlinWebpackConfig.DevServer.Client(
KotlinWebpackConfig.DevServer.Client.Overlay(
errors = true,
warnings = false
)
)
)
},
{
@@ -169,8 +169,18 @@ data class KotlinWebpackConfig(
var port: Int? = null,
var proxy: MutableMap<String, Any>? = null,
var static: MutableList<String>? = null,
var contentBase: MutableList<String>? = null
) : Serializable
var contentBase: MutableList<String>? = null,
var client: Client? = null
) : Serializable {
data class Client(
var overlay: Any /* Overlay | Boolean */
) : Serializable {
data class Overlay(
var errors: Boolean,
var warnings: Boolean
) : Serializable
}
}
fun save(configFile: File) {
configFile.writer().use {