I've finally managed to compile whole KVision with...
# javascript
r
I've finally managed to compile whole KVision with 1.4 IR backend and to build the showcase example with it. And the bundle size is almost 2x larger! What has happened? I made some tests with M1 a few months ago, and it was smaller back then (later with M3 and RC it did not compile because of KT-40083). Anyone tried to build something with 1.4 IR? Does it work ok for you? Can I somehow debug this? I don't see any temporary files from DCE in the build folder.
with legacy backend it works fine (the bundle is just a few KB larger than with 1.3.72)
When I look at the generated JS code, almost half of the file is filled with "junk" like this:
Copy code
FieldLabel.prototype.unaryPlus_18 = Tag.prototype.unaryPlus_18;
  FieldLabel.prototype.childrenVNodes_77 = SimplePanel.prototype.childrenVNodes_77;
  FieldLabel.prototype.addInternal_79 = SimplePanel.prototype.addInternal_79;
  FieldLabel.prototype.add_114 = SimplePanel.prototype.add_114;
  FieldLabel.prototype.addAll_94 = SimplePanel.prototype.addAll_94;
  FieldLabel.prototype.remove_123 = SimplePanel.prototype.remove_123;
it seems such lines are generated for every inherited property / method for the whole class hierarchy
I have over 25000 such lines in my bundle!
Anyone has any idea what is this?
I've filled an issue about this: https://youtrack.jetbrains.com/issue/KT-41227