ansman
02/02/2022, 3:58 PM-Xir-property-lazy-initialization
which doesn’t really do anything (actually increases our size). When paired with -Xir-per-module
it reduces the size by 75%! However, this is only because it’s missing some imports. We use 3 libraries:
• Kotlinx serialization
• Kotlinx immutable collections
• Kotlin stdlib
I see 5 JS files as expected (two for serialization) in the build directory but the module JS file only contains this:
}(module.exports, require('./kotlin-kotlin-stdlib-js-ir.js'), require('./kotlinx-serialization-kotlinx-serialization-core-js-ir.js')));
So the bundle fails because one of the kotlinx serialization (the JSON part) and the kotlinx immutable is missing from the final, webpacked, JS file. Is this a bug or did I miss something?ankushg
02/02/2022, 5:58 PMrequire
calls come out OK in the end.
We don’t use kotlinx immutables, but we do use the core/json serialization modules.ansman
02/02/2022, 6:02 PMankushg
02/02/2022, 7:10 PMansman
02/02/2022, 7:21 PMansman
02/03/2022, 4:33 PMcommonMain
sourceset. When In add them explicitly to the jsMain
sourceset they are correctly imported.ankushg
02/03/2022, 7:50 PMansman
02/04/2022, 7:34 PM