Skip to content

fix: keep the import frame in native loader errors - #11599

Merged
sheremet-va merged 1 commit into
mainfrom
fix/native-loader-import-frame
Oct 15, 2026
Merged

sheremet-va merged 1 commit into
mainfrom
fix/native-loader-import-frame

Conversation

@sheremet-va

Copy link
Copy Markdown
Member

Node 26.12 evaluates most ES modules synchronously (nodejs/node#62530), so the hoisted await import() of a mocked module no longer gets an async frame from V8. Errors thrown while loading the module lost the import location and its code frame.

wrapDynamicImport now captures the import location and appends it to the error and its causes when V8 did not. The async factory error gains the same frame.

@netlify

netlify Bot commented Oct 15, 2026

Copy link
Copy Markdown

✅ Deploy Preview for vitest-dev ready!

Name Link
🔨 Latest commit aff5543
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/6ad0ad643196099dfb880a5f
😎 Deploy Preview https://deploy-preview-11599--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@sheremet-va
sheremet-va merged commit 9697b38 into main Oct 15, 2026
23 of 30 checks passed
@sheremet-va
sheremet-va deleted the fix/native-loader-import-frame branch October 15, 2026 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant