Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ensure source maps can be traced by debugger (#886)
close #675 - Populate the `sourcesContent` array - Resolve relative paths in the `sources` array The `sourcesContent` of a source map can be null, which makes the devtools ask Vite for the original source. This can lead to Vite responding with transformed code, since Vite supports importing TypeScript directly. By populating the `sourcesContent` before sending the source map, the devtools won't need to ask Vite for the original source directly. The `sources` array may contain relative paths, which are resolved to a /@modules/ path by the devtools. It would be better to know the actual path of the original source, so this PR resolves the relative path before sending the source map to the debugger.
- Loading branch information