Has anyone hit member-name minification breaking i...
# javascript
a
Has anyone hit member-name minification breaking in Kotlin/JS 2.4.20? For a production library binary (
js { binaries.library() }
), non-exported fields and methods keep their original names on 2.4.20 but are minified on 2.4.10.
Here's how it looks and reproducible example. Also tried
freeCompilerArgs.add("-Xir-minimized-member-names=true")
option, doesn't help
In 2.4.20 notes, there's something about minimizer-webpack-plugin, but I don't configure
terser-webpack-plugin
directly
b
This definitely looks like a bug, can I ask you to file an issue please? kotl.in/issue
a
Yes, of course, will do it.
b
Thank you!
r
I think it also makes bundle size larger with 2.4.20. I had already noticed a significant increase, but now, upon closer inspection, the library method names are clearly readable (whereas with 2.4.0 they weren't).
The same application bundle - old (120KB) and new (160KB).
b
We will try to fix this ASAP and land the fix in 2.4.21. Thank you for reporting.
thank you color 4
🤝 1
🤝🏾 1
e
Btw, this does not depend on Webpack, since it reproduces also on
nodejs
, which does not use it. I think this is a (kinda) non-issue for
nodejs()
+
binaries.library()
producers, since an additional pass will be done via a bundler (e.g., ESBuild) most likely.
Will wait for 2.4.21 anyways tho, just to be able to properly compare outputs with 2.3.21.
I think this is a (kinda) non-issue for
nodejs()
+
binaries.library()
producers, since an additional pass will be done via a bundler
This is incorrect. Class properties aren't minified/mangled, so indeed it is an issue even for Node.js.