Trying to access the sourcemap from the karma server fails with a 404
It seems the esbuild config needs to have
publicPath: '/base'
to deal with the prefix that karma puts everything under. This makes the sourceMappingURL injected into the bundle correct.
In addition to that, the bundlerMap stores file names with their absolute path but the esbuild middleware looks it up using a relative path so it can never find the sourcemap.
Thanks for reporting this issue and the debugging hints. I've come across that one myself and attempted a fix in #37 , but haven't had the time so far to get that PR ready. Would love some help.
Trying to access the sourcemap from the karma server fails with a 404
It seems the
esbuild
config needs to haveto deal with the prefix that karma puts everything under. This makes the
sourceMappingURL
injected into the bundle correct.In addition to that, the
bundlerMap
stores file names with their absolute path but the esbuild middleware looks it up using a relative path so it can never find the sourcemap.