Does anyone knows, how advanced DCE is? If I would...
# javascript
t
Does anyone knows, how advanced DCE is? If I would for example write something like that:
Copy code
const val DEBUG = false

fun doSomething(debug : Boolean) {
    if(debug) {
        doSomeDebugStuff()
    }
}
Would DCE get rid of
doSomeDebugStuff
from output js? Would it work across libraries? Would it work if I would store debug as field of some class?
t
AFAIK Webpack can do this work in ES6
Also it can work in ES5 - check required