What are pros and cons of `kotlin.js.ir.output.gra...
# javascript
v
What are pros and cons of
kotlin.js.ir.output.granularity
whole-project
vs.
per-module
?
t
whole-program
1. More optimal bundle 2. Ready bundle if you don’t use additional NPM libraries 3. Transparent possibility to use other Kotlin/JS subprojects in dynamic imports 4. Slower build?
per-module
1. Faster build?
v
So I got you right, that you would prefer
whole-program
? Or are you a speed junkie? 😄 And under the premise that I send it through ncc and thus webpack which should neglect 1., I use other NPM libs which neglects 2., and I don't split the project into multiple projects (it's anyway just 2 classes) which neglects 3. Then still? 🙂
t
Then still? 🙂
Yes
v
Why, if only slower build is left over? 😄
I'm really curious, as you for sure have some reason :-)
t
whole-program
is transparent - it is what I understand All Kotlin code in one bundle for better DCE!
File to file is also fine, but it's not supported right now Goal - app with multiple entry points
Per module - in simple cases it has no sense. I see only usages without DCE usage :(
v
Ok, thanks for your thoughts :-)