Hi everyone! I can’t seem to get to work source ma...
# kvision
Hi everyone! I can’t seem to get to work source maps under the latest KVision release (4.8.1), using the LEGACY JS compiler. Taking as base the
example (I suppose could be any other example too), I’ve done as instructed in the docs:
Copy code
To enable source maps you need to remove line sourceMaps = false from your build.gradle.kts file and remove line config.devtool = 'eval-cheap-source-map' from webpack.config.d/webpack.js file.
and enabled legacy compiler by setting under gradle.properties:
Copy code
But I’m not able to get source maps working. I think they were working on 4.1.0, which is the latest version I tried before updating. To test, I make a simple console.log() on App.kt and then I get the following error when clicking the line number on the console:
Copy code
Could not load content for <webpack://fomantic/../src/main/kotlin/com/example/App.kt?f474> (HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME)
Is anyone having this issue as well?
Found the issue! It’s due to
npm package version mismatch (https://youtrack.jetbrains.com/issue/KT-46608). There is a workaround in the comments.
I'v tested this workaround a few days ago and even accidentally committed this in the template project: https://github.com/rjaros/kvision-examples/blob/master/template/build.gradle.kts#L66
😄 1
It should be fixed with kotlin 1.5.20
K 1