Skip to content

sea: add source maps for SEA with VFS - #67503

Draft
mcollina wants to merge 1 commit into
nodejs:mainfrom
mcollina:sea-vfs-sourcemaps
Draft

mcollina wants to merge 1 commit into
nodejs:mainfrom
mcollina:sea-vfs-sourcemaps

Conversation

@mcollina

Copy link
Copy Markdown
Member

Adds source-map support for single executable applications built with
"useVfs": true, so .map files and original sources bundled as assets (or
in the "vfsArchive" archive) are read through the virtual file system and
applied to stack traces, module.findSourceMap(), and the error source
preview above an uncaught error.

Adds two tests covering the inline-assets and zip-archive VFS paths, each
asserting that the source map resolves against the mount point and that a
thrown error's frame and source line are remapped to the original source.
Also documents enabling source maps in a SEA and bundling the maps.

SEA binaries built with "useVfs" can now load source maps from the
bundled assets (or the "vfsArchive" archive) and apply them to stack
traces and error output, because fs reads are routed through the virtual
file system mounted by the SEA.

Add two tests covering the inline-assets and zip-archive VFS paths, each
asserting that findSourceMap() resolves against the mount point and that
a thrown error's frame and source line are remapped to the original
source. Also document how to enable and bundle source maps in a SEA.
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/single-executable

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants