This PR fixes 404 Errors when trying to fetch source maps with singleBundle: false.
With singleBundle: false the test files will typically be resolved to somewhere inside the project directory. When karma detects that, it will use URLs starting with /base/... and followed with a relative path to the file. With absolute URLs the full absolute path is used in the URL preceded by /absolute/....
In our internal bundle map structure we're matching files by their absolute path on disk though, which means we need to resolve to the full absolute path when we encounter relative URLs in our middleware.
This PR fixes
404 Errors
when trying to fetch source maps withsingleBundle: false
.With
singleBundle: false
the test files will typically be resolved to somewhere inside the project directory. When karma detects that, it will use URLs starting with/base/...
and followed with a relative path to the file. With absolute URLs the full absolute path is used in the URL preceded by/absolute/...
.Example project root:
/foo/my-project
In our internal bundle map structure we're matching files by their absolute path on disk though, which means we need to resolve to the full absolute path when we encounter relative URLs in our middleware.