Getting source maps to work



I’m compiling Kotlin to JS using version 1.2.21 and my project is organised using Maven.

I’ve enabled to source maps generation in the maven plugin compiler and I’m using maven to compile my kotlin to js.

I’ve turned on source maps in the browser.

I’ve created an HTML file at root level in my maven module which points to the compiled js files residing in target/js

However when I try to open my kotlin file main.kt in the browser then it’s blank. See attached pictures.

As you can see the browser detects the Kotlin source maps but not my application’s source map.

I’m opening the HTML file from IntelliJ, which opens the file in my browser on a URL like this:

Has anyone this experience? And know if it’s a bug somewhere?


@jvskriubakken please create an issue with a sample project if possible.


Looks like you/we have an issue with paths, you can try to workaround it by inlining all sources to .map file with setting sourceMapEmbedSources to “always” (see