Unverified Commit ca559a52 authored by Miguel da Mota's avatar Miguel da Mota Committed by GitHub

fix: exclude `basePath` in `findSourceMapURL` (#71719)

This PR fixes #71706.

When having an error client side and there is a `basePath` defined, the
basePath is being used to locate the sourcemap of the given file which
results in an error.

With these changes the `basePath` gets removed from the `filename`
passed to `findSourceMapURL`

If you have questions, feel free to ask!
parent 51d6e765
......@@ -8,7 +8,10 @@ export const findSourceMapURL =
url.searchParams.set(
'filename',
filename.replace(new RegExp(`^${document.location.origin}`), '')
filename.replace(
new RegExp(`^${document.location.origin}${basePath}`),
''
)
)
return url.href
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment