Fix browser settings for webpack tasks
This commit is contained in:
+4
-1
@@ -83,6 +83,7 @@ open class KotlinBrowserJsIr @Inject constructor(target: KotlinJsIrTarget) :
|
|||||||
it.commonConfigure(
|
it.commonConfigure(
|
||||||
compilation = compilation,
|
compilation = compilation,
|
||||||
binary = binary,
|
binary = binary,
|
||||||
|
configurationActions = commonRunConfigurations,
|
||||||
nodeJs = nodeJs
|
nodeJs = nodeJs
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -142,6 +143,7 @@ open class KotlinBrowserJsIr @Inject constructor(target: KotlinJsIrTarget) :
|
|||||||
it.commonConfigure(
|
it.commonConfigure(
|
||||||
compilation = compilation,
|
compilation = compilation,
|
||||||
binary = binary,
|
binary = binary,
|
||||||
|
configurationActions = commonWebpackConfigurations,
|
||||||
nodeJs = nodeJs
|
nodeJs = nodeJs
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -173,6 +175,7 @@ open class KotlinBrowserJsIr @Inject constructor(target: KotlinJsIrTarget) :
|
|||||||
private fun KotlinWebpack.commonConfigure(
|
private fun KotlinWebpack.commonConfigure(
|
||||||
compilation: KotlinJsCompilation,
|
compilation: KotlinJsCompilation,
|
||||||
binary: Executable,
|
binary: Executable,
|
||||||
|
configurationActions: List<KotlinWebpack.() -> Unit>,
|
||||||
nodeJs: NodeJsRootExtension
|
nodeJs: NodeJsRootExtension
|
||||||
) {
|
) {
|
||||||
val type = binary.mode
|
val type = binary.mode
|
||||||
@@ -186,7 +189,7 @@ open class KotlinBrowserJsIr @Inject constructor(target: KotlinJsIrTarget) :
|
|||||||
|
|
||||||
entryProperty.set(project.layout.file(binary.linkTask.map { it.outputFile }))
|
entryProperty.set(project.layout.file(binary.linkTask.map { it.outputFile }))
|
||||||
|
|
||||||
commonRunConfigurations.forEach { configure ->
|
configurationActions.forEach { configure ->
|
||||||
configure()
|
configure()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-1
@@ -116,6 +116,7 @@ open class KotlinBrowserJs @Inject constructor(target: KotlinJsTarget) :
|
|||||||
dceTaskProvider = dceTaskProvider,
|
dceTaskProvider = dceTaskProvider,
|
||||||
devDceTaskProvider = devDceTaskProvider,
|
devDceTaskProvider = devDceTaskProvider,
|
||||||
mode = type,
|
mode = type,
|
||||||
|
configurationActions = commonRunConfigurations,
|
||||||
nodeJs = nodeJs
|
nodeJs = nodeJs
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -178,6 +179,7 @@ open class KotlinBrowserJs @Inject constructor(target: KotlinJsTarget) :
|
|||||||
dceTaskProvider = dceTaskProvider,
|
dceTaskProvider = dceTaskProvider,
|
||||||
devDceTaskProvider = devDceTaskProvider,
|
devDceTaskProvider = devDceTaskProvider,
|
||||||
mode = type,
|
mode = type,
|
||||||
|
configurationActions = commonWebpackConfigurations,
|
||||||
nodeJs = nodeJs
|
nodeJs = nodeJs
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -213,6 +215,7 @@ open class KotlinBrowserJs @Inject constructor(target: KotlinJsTarget) :
|
|||||||
dceTaskProvider: TaskProvider<KotlinJsDceTask>,
|
dceTaskProvider: TaskProvider<KotlinJsDceTask>,
|
||||||
devDceTaskProvider: TaskProvider<KotlinJsDceTask>,
|
devDceTaskProvider: TaskProvider<KotlinJsDceTask>,
|
||||||
mode: KotlinJsBinaryMode,
|
mode: KotlinJsBinaryMode,
|
||||||
|
configurationActions: List<KotlinWebpack.() -> Unit>,
|
||||||
nodeJs: NodeJsRootExtension
|
nodeJs: NodeJsRootExtension
|
||||||
) {
|
) {
|
||||||
dependsOn(
|
dependsOn(
|
||||||
@@ -235,7 +238,7 @@ open class KotlinBrowserJs @Inject constructor(target: KotlinJsTarget) :
|
|||||||
|
|
||||||
resolveFromModulesFirst = true
|
resolveFromModulesFirst = true
|
||||||
|
|
||||||
commonRunConfigurations.forEach { configure ->
|
configurationActions.forEach { configure ->
|
||||||
configure()
|
configure()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user