When I have an MPP project with a js target that I make as a library and consume it in another KotlinJs
or MPP project, I’d like to be able to debug into that libraries source with the sourcemap. Right now, it appears that I’m able to access the source of my current project via webpack within the browser, but none of the source from a dependency.
For example, let’s say I have a project with this:
Main.kt
fun main() {
throw RuntimeException("blah")
}
the browser generates this correctly with this in the console
And the kicker is that clicking on the Main.kt link, it loads my source file properly, and I can put breakpoints in it perfectly.

now if I’ve got a library project with a js target that I pull in from maven that has a function like so
Bootstrap.Kt
package github.fatalcatharsis
fun test() {
throw RuntimeException("blah2")
}
and change
Main.kt
import github.fatalcatharsis.test
fun main() {
test()
}
the browser still interprets the source map correctly
But cannot load the source.
Has anyone dealt with this? I assume it’s either that the sources in my “-sources” variant aren’t being pulled in and made available to webpack or that they are but webpack just isn’t being configured to look at them properly.