So it looks like Kotlin/JS IR doesn't do DCE when ...
# javascript
j
So it looks like Kotlin/JS IR doesn't do DCE when we call
binaries.library()
- is this on the horizon?
t
It looks like expected behaviour
j
🤔 probably cause DCE can't determine which things I actually want to keep around? I noticed when I used
mutableMapOf
it blew up my payload size substantially - so perhaps the right thing to do is use an npm package that does what I need
I guess I could make a wrapper library that depends and re-exposes mine that does treeshaking
j
you should probably switch to binaries.executable if you want DCE to remove things you don't use and things you don't want removed, you then have to manually flag with @JsExport for binaries.library, my guess is that it's expected that an external tool will do DCE
1