Sourcemaps have offset if code contains defineAsyncComponent with dynamic import #12634
Closed
7 tasks done
Labels
p3-minor-bug
An edge case that only affects very specific usage (priority)
Describe the bug
We are compiling and building for production using vite.
We have a file has async component with dynamic import.
Source map of latter declaration have offset.
Reproduction
https://github.com/eran-swimm/source-map-example
Steps to reproduce
The example is based on the
pnpm create vite
example with typescript and vue.js.The main page has two buttons, one to call method1 and one to call method 2. Both methods have debugger statement in their body.
method1
is defined before the async component, when calling method1, the debugger stops at the right line. All definitions are in the HelloWorld componentmethod2
is defined after the async component, when calling method2, the debugger stops in one line offsetSystem Info
Used Package Manager
pnpm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: