Fix unconditional warning in JS compilation with sourceMap disabled.
This commit is contained in:
+1
-1
@@ -51,7 +51,7 @@ open class DefaultValues(val defaultValue: String, val possibleValues: List<Stri
|
|||||||
)
|
)
|
||||||
|
|
||||||
object JsSourceMapContentModes : DefaultValues(
|
object JsSourceMapContentModes : DefaultValues(
|
||||||
"\"${K2JsArgumentConstants.SOURCE_MAP_SOURCE_CONTENT_INLINING}\"",
|
"null",
|
||||||
listOf(
|
listOf(
|
||||||
K2JsArgumentConstants.SOURCE_MAP_SOURCE_CONTENT_NEVER,
|
K2JsArgumentConstants.SOURCE_MAP_SOURCE_CONTENT_NEVER,
|
||||||
K2JsArgumentConstants.SOURCE_MAP_SOURCE_CONTENT_ALWAYS,
|
K2JsArgumentConstants.SOURCE_MAP_SOURCE_CONTENT_ALWAYS,
|
||||||
|
|||||||
+2
-2
@@ -51,9 +51,9 @@ interface KotlinJsOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions
|
|||||||
/**
|
/**
|
||||||
* Embed source files into source map
|
* Embed source files into source map
|
||||||
* Possible values: "never", "always", "inlining"
|
* Possible values: "never", "always", "inlining"
|
||||||
* Default value: "inlining"
|
* Default value: null
|
||||||
*/
|
*/
|
||||||
var sourceMapEmbedSources: kotlin.String
|
var sourceMapEmbedSources: kotlin.String?
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prefix for paths in a source map
|
* Prefix for paths in a source map
|
||||||
|
|||||||
+4
-4
@@ -64,9 +64,9 @@ internal abstract class KotlinJsOptionsBase : org.jetbrains.kotlin.gradle.dsl.Ko
|
|||||||
get() = sourceMapField ?: false
|
get() = sourceMapField ?: false
|
||||||
set(value) { sourceMapField = value }
|
set(value) { sourceMapField = value }
|
||||||
|
|
||||||
private var sourceMapEmbedSourcesField: kotlin.String? = null
|
private var sourceMapEmbedSourcesField: kotlin.String?? = null
|
||||||
override var sourceMapEmbedSources: kotlin.String
|
override var sourceMapEmbedSources: kotlin.String?
|
||||||
get() = sourceMapEmbedSourcesField ?: "inlining"
|
get() = sourceMapEmbedSourcesField ?: null
|
||||||
set(value) { sourceMapEmbedSourcesField = value }
|
set(value) { sourceMapEmbedSourcesField = value }
|
||||||
|
|
||||||
private var sourceMapPrefixField: kotlin.String?? = null
|
private var sourceMapPrefixField: kotlin.String?? = null
|
||||||
@@ -117,7 +117,7 @@ internal fun org.jetbrains.kotlin.cli.common.arguments.K2JSCompilerArguments.fil
|
|||||||
noStdlib = true
|
noStdlib = true
|
||||||
outputFile = null
|
outputFile = null
|
||||||
sourceMap = false
|
sourceMap = false
|
||||||
sourceMapEmbedSources = "inlining"
|
sourceMapEmbedSources = null
|
||||||
sourceMapPrefix = null
|
sourceMapPrefix = null
|
||||||
target = "v5"
|
target = "v5"
|
||||||
typedArrays = true
|
typedArrays = true
|
||||||
|
|||||||
Reference in New Issue
Block a user