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(
|
||||
compilation = compilation,
|
||||
binary = binary,
|
||||
configurationActions = commonRunConfigurations,
|
||||
nodeJs = nodeJs
|
||||
)
|
||||
|
||||
@@ -142,6 +143,7 @@ open class KotlinBrowserJsIr @Inject constructor(target: KotlinJsIrTarget) :
|
||||
it.commonConfigure(
|
||||
compilation = compilation,
|
||||
binary = binary,
|
||||
configurationActions = commonWebpackConfigurations,
|
||||
nodeJs = nodeJs
|
||||
)
|
||||
|
||||
@@ -173,6 +175,7 @@ open class KotlinBrowserJsIr @Inject constructor(target: KotlinJsIrTarget) :
|
||||
private fun KotlinWebpack.commonConfigure(
|
||||
compilation: KotlinJsCompilation,
|
||||
binary: Executable,
|
||||
configurationActions: List<KotlinWebpack.() -> Unit>,
|
||||
nodeJs: NodeJsRootExtension
|
||||
) {
|
||||
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 }))
|
||||
|
||||
commonRunConfigurations.forEach { configure ->
|
||||
configurationActions.forEach { configure ->
|
||||
configure()
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -116,6 +116,7 @@ open class KotlinBrowserJs @Inject constructor(target: KotlinJsTarget) :
|
||||
dceTaskProvider = dceTaskProvider,
|
||||
devDceTaskProvider = devDceTaskProvider,
|
||||
mode = type,
|
||||
configurationActions = commonRunConfigurations,
|
||||
nodeJs = nodeJs
|
||||
)
|
||||
|
||||
@@ -178,6 +179,7 @@ open class KotlinBrowserJs @Inject constructor(target: KotlinJsTarget) :
|
||||
dceTaskProvider = dceTaskProvider,
|
||||
devDceTaskProvider = devDceTaskProvider,
|
||||
mode = type,
|
||||
configurationActions = commonWebpackConfigurations,
|
||||
nodeJs = nodeJs
|
||||
)
|
||||
|
||||
@@ -213,6 +215,7 @@ open class KotlinBrowserJs @Inject constructor(target: KotlinJsTarget) :
|
||||
dceTaskProvider: TaskProvider<KotlinJsDceTask>,
|
||||
devDceTaskProvider: TaskProvider<KotlinJsDceTask>,
|
||||
mode: KotlinJsBinaryMode,
|
||||
configurationActions: List<KotlinWebpack.() -> Unit>,
|
||||
nodeJs: NodeJsRootExtension
|
||||
) {
|
||||
dependsOn(
|
||||
@@ -235,7 +238,7 @@ open class KotlinBrowserJs @Inject constructor(target: KotlinJsTarget) :
|
||||
|
||||
resolveFromModulesFirst = true
|
||||
|
||||
commonRunConfigurations.forEach { configure ->
|
||||
configurationActions.forEach { configure ->
|
||||
configure()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user