Hi all! After a long wait I could finally enable t...
# javascript
j
Hi all! After a long wait I could finally enable the IR compiler on my project! After running the production webpack, the size of the resulting js file went down from 4.9MB to a whopping 4.3MB, which in fairness was a bit disappointing. I use the React-wrapper, Coroutines, Ktor, Kodein, is there any way to optimize the size?
r
t
Also ES6 modules required to unlock webpack optimization
👍 1
Root export will help too
m
IR output is pretty much unoptimized. I’ve reduced the output a little by improving terser settings: https://gist.github.com/fluidsonic/db4f7b566cff547934043af1c3d6e87b
👍 1
Ktor and Coroutines are hefty. Because I don’t need those on the index/home page I load them dynamically when a page is navigated to which depends on them.
Or a dialog opened which needs them.
t
I’ve reduced the output a little by improving terser settings
@Marc Knaup Which effect do you have (bundle size percent)?
m
I can’t recall. Was a few months ago and a very messy path to get to these settings 😅 If I find time I could make a new comparison with the current project state.
🙂 1
j
Thank you guys for the answers! @Robert Jaros ktor is very much needed as I make use of KMP and I do not wish to implement different networking
m
image.png
1
includes ktor/coroutines 😅
👍 1