Gradle, js: introduce commonJs() dsl function
This commit is contained in:
+10
@@ -51,4 +51,14 @@ class KotlinJsTarget(project: Project, platformType: KotlinPlatformType) :
|
|||||||
override fun nodejs(body: KotlinJsNodeDsl.() -> Unit) {
|
override fun nodejs(body: KotlinJsNodeDsl.() -> Unit) {
|
||||||
nodejs.body()
|
nodejs.body()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun useCommonJs() {
|
||||||
|
compilations.all {
|
||||||
|
it.compileKotlinTask.kotlinOptions {
|
||||||
|
moduleKind = "commonjs"
|
||||||
|
sourceMap = true
|
||||||
|
sourceMapEmbedSources = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user