Hello! Is there a way to disable minification for ...
# javascript
p
Hello! Is there a way to disable minification for production builds. It seems that the source-maps are broken when the code is minified. Or is there a good guide on how to setup a kotlinjs production build with sourcemaps and all. By the way we are using Kotlin 1.5.10.
b
Why not just use
./gradlew jsDevelopmentExecutable
instead? Prod executables usually shouldn't contain sourcemaps.
r
Source maps are broken in 1.5.10, see: https://youtrack.jetbrains.com/issue/KT-46608
b
Can't wait to get sourceMaps on IR and get rid of legacy compiler
r
You can disable minification by adding custom webpack config and configure Terser webpack plugin.
@Big Chungus can't wait to see IR compiler as fast as the legacy 🙂 till then I'm using legacy for development 🙂
p
@Big Chungus yes the source maps should not be in the production build, at least not on the internet. So what i try to do is to upload the sourcemaps to sentry.io . But it seems that the sourcemaps produced while the build are incompatible with the final code.