Skip to content
This repository has been archived by the owner on Feb 17, 2023. It is now read-only.

fix: missing sourcemap fields after compiling ts in dev #158

Merged
merged 1 commit into from
Jan 2, 2022

Conversation

dreamerblue
Copy link
Contributor

If other Vite plugin transformed vue code before vite-plugin-vue2, the code passed to transform() will be the modified code.

But if the code source is TypeScript, the esbuild transform result will miss some sourcemap fields like sourcesContent. it will cause rollup try to read source content from file system (its different from modified code) when generating sourcemap, so the final sourcemap cannot be mapped to current source.

This PR fixed it by adding missing fields from previous map.

@underfin underfin merged commit ee1ff2e into underfin:master Jan 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants