Brandon Saunders
03/04/2020, 7:22 PMIlya Goncharov [JB]
03/04/2020, 9:19 PMimport org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackOutput.Target
...
kotlin {
js {
webpackTask {
output.libraryTarget = Target.COMMONJS
}
}
}
<http://webpack.co|webpack.co>nfig.d
you can do more fine grained configauration of webpack, but it can be less reliable, and build can be broken
Scripts in <http://webpack.co|webpack.co>nfig.d
simply appends to <http://webpack.co|webpack.co>nfig.js
and so you can configure webpack through variable config
Janelle Fullen
03/04/2020, 9:36 PMIlya Goncharov [JB]
03/04/2020, 9:40 PMconfig
variable<http://webpack.co|webpack.co>nfig.d/something.js
with conent
config.output = config.output || {}
config.output.libraryExport = [“com”, “example”]
Janelle Fullen
03/04/2020, 10:40 PMEivind Nilsbakken
03/06/2020, 7:19 AMwebpack.config.d
have to be placed directly under $projectDir
? I can get it to work that way, but I'd prefer to place it in src/jsMain/resources
.