[Gradle, JS] Args for webpack
This commit is contained in:
+4
@@ -123,6 +123,9 @@ open class KotlinWebpack : DefaultTask(), RequiresNpmDependencies {
|
||||
@Input
|
||||
var bin: String = "webpack/bin/webpack.js"
|
||||
|
||||
@Input
|
||||
var args: MutableList<String> = mutableListOf()
|
||||
|
||||
@Input
|
||||
var sourceMaps: Boolean = true
|
||||
|
||||
@@ -145,6 +148,7 @@ open class KotlinWebpack : DefaultTask(), RequiresNpmDependencies {
|
||||
configFile,
|
||||
execHandleFactory,
|
||||
bin,
|
||||
args,
|
||||
KotlinWebpackConfig(
|
||||
mode = mode,
|
||||
entry = entry,
|
||||
|
||||
+3
@@ -17,6 +17,7 @@ internal data class KotlinWebpackRunner(
|
||||
val configFile: File,
|
||||
val execHandleFactory: ExecHandleFactory,
|
||||
val tool: String,
|
||||
val args: List<String>,
|
||||
val config: KotlinWebpackConfig
|
||||
) {
|
||||
fun execute() = npmProject.project.execWithErrorLogger("webpack") {
|
||||
@@ -43,6 +44,8 @@ internal data class KotlinWebpackRunner(
|
||||
args.add("--progress")
|
||||
}
|
||||
|
||||
args.addAll(this.args)
|
||||
|
||||
npmProject.useTool(execFactory, tool, *args.toTypedArray())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user