Daniele B
07/27/2023, 2:54 AMGoetz Markgraf
07/27/2023, 6:04 AMAction
-Object with the lambda as a parameter worked for me:
commonWebpackConfig(Action {
cssSupport {
enabled.set(true)
})
Daniele B
07/27/2023, 6:07 AMGoetz Markgraf
07/27/2023, 6:08 AMKotlinWebpackConfig
-Object should copy the original values. At least it was like this in case of the DevServer
-Object.Edoardo Luppi
07/27/2023, 9:04 AMAction
wrapping, it makes the DSL more "difficult"Artem Kobzar
07/27/2023, 9:25 AMVampire
07/27/2023, 10:52 AMbody: KotlinWebpackConfig.() -> Unit)
and one that takes body: Action<KotlinWebpackConfig>)
. With just the OP code, both could be satisfied and the first one wins. If the first one is deleted, i.e. like on master
, the second one would be used automatically. But while both are there, the deprecated one wins.Ilya Goncharov [JB]
07/27/2023, 11:49 AM1.9.20
only variant with Action
will be left. Because Gradle generates accessors for Kotlin, it will not be mandatory to write Action {}
And we need to use only function with Action
input parameter because it can be used as Input parameter for GradleEdoardo Luppi
07/27/2023, 11:58 AMArtem Kobzar
07/27/2023, 12:15 PMoutputFileName
?turansky
07/27/2023, 8:32 PMmoduleName
+ ".js"
// default
moduleName
+ ".mjs"
// ESMDaniele B
07/28/2023, 1:48 AMcommonWebpackConfig
and the outputFileName
explicitely:
js(IR) {
moduleName = "cms"
browser()
binaries.executable()
}
but the name of the compiled js file became "jsApp.js", and not "cms.js" as you expected.
It would be great if it worked the way you said, but unfortunately it doesn't.turansky
07/28/2023, 12:42 PMturansky
07/28/2023, 12:43 PMoutputFileName
works for me (except ESM)Daniele B
07/28/2023, 3:51 PMjs(IR) {
moduleName = "cms"
browser {
commonWebpackConfig (Action {
outputFileName = "cms.js"
})
}
binaries.executable()
}