- Non-static webpack configuration
- Make Kotlin
resources
content available for Webpack
plugins {
kotlin("js") version "1.5.30"
id("com.github.turansky.kfc.webpack") version "4.30.0"
}
kotlin.js {
browser()
}
tasks {
patchWebpackConfig {
// language=JavaScript
patch(
"""
config.output.library.export = ['com', 'example', 'app']
""")
}
}
webpack.config.d
directory will be used as temp.
Add following .gitignore
instruction to exclude directory from Git:
webpack.config.d/
By default webpack
plugin add src/main/resources
directory of:
- Current subproject
- Dependency subprojects
as Webpack modules
.
Apply webpack
plugin by default
- Fast build
- Modularity
- Disable DCE
- Disable Webpack build
- Kotlin/JS target -
commonjs
plugins {
kotlin("js") version "1.5.30"
id("com.github.turansky.kfc.library") version "4.30.0"
}