when using kotlin-dce-js, with the kotlin dsl, I’m...
# javascript
g
when using kotlin-dce-js, with the kotlin dsl, I’m having issues with the ‘keep’ parameter working. I would like to keep all code in my package/namespace, and have it prune the kotlin.js and related dependencies based on what my package/namespace is referencing.
Copy code
tasks {
    withType<KotlinJsDce> {
        dceOptions {
            devMode = false
        }
        // NOTE: Keep settings don't seem to work at all.  Have tried each individually, and normal package/namespace expressions.
        keep("com.gigwell.PresetType", "com.gigwell", "com.gigwell.*")
    } 
}
This is currently being invoked via the webpackTask but I’m guessing this is more my misunderstanding of the dce parameter?
⬆️ 1
👀 2
i
@glade DCE works with js files so you should use declaration like this
<js-file-name>.<fqn>
e.g
"<http://my-test-project.com|my-test-project.com>.gigwell.PresetType"
b
btw, to keep all in package just reference to package, e.g.
<module-name>.path.to.mypackage
g
Thanks for pointing that out, i do see the part of the doc I missed.