Merged
Conversation
Deploying rsbuild with
|
| Latest commit: |
2ce027c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://9c892529.rsbuild-v2.pages.dev |
| Branch Preview URL: | https://ssr-esm-debugger.rsbuild-v2.pages.dev |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to fix SSR ESM breakpoint handling by improving how ESM modules are created in the VM and by avoiding overwriting any existing NODE_OPTIONS (e.g., those set by debuggers like VS Code).
Changes:
- Adjust the
EsmRunnerto use the file path as theSourceTextModuleidentifier while keeping a custom URL query for sourcemap/breakpoint support. - Update e2e and SSR dev scripts to compose
NODE_OPTIONSwith--experimental-vm-modules(and--no-warningsfor tests) instead of unconditionally overwriting it.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| packages/core/src/server/runner/esm.ts | Changes the VM SourceTextModule identifier and keeps a custom URL to improve ESM sourcemap and breakpoint behavior in SSR. |
| e2e/package.json | Modifies the e2e Playwright test script to add VM-related flags via NODE_OPTIONS while attempting to respect any pre-existing debugger configuration. |
| e2e/cases/server/ssr/package.json | Updates the SSR ESM dev script to set NODE_OPTIONS and TEST_ESM_LIBRARY in a way intended to preserve existing NODE_OPTIONS. |
| e2e/cases/server/ssr-type-module/package.json | Updates the SSR type: module dev script to compose NODE_OPTIONS with --experimental-vm-modules without overwriting prior settings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
chenjiahan
approved these changes
Jan 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fix esm ssr break point not working:
https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_how-can-i-set-nodeoptions
Related Links
Checklist