Repository navigation
Conversation
maschwenk
marked this pull request as ready for review
November 5, 2026 16:19
maschwenk
force-pushed
the
feat/module-runner-separate-source-map-pr
branch
from
November 6, 2026 11:44
217c23b to
bdfb9c1
Compare
Contributor
Author
|
@sapphi-red this is ready for review. it follows your design from except with |
… need them Add `dev.sourcemapForDebugger` (default true). When it's disabled, the server returns the map as a JSON string in `ViteFetchResult.sourceMap` instead of inlining it, so the code V8 compiles has no source map comment, and createServerModuleRunner defaults to the prepareStackTrace interceptor. Runners using the 'node' interceptor and older runners keep inline maps.
maschwenk
force-pushed
the
feat/module-runner-separate-source-map-pr
branch
from
November 13, 2026 13:09
bdfb9c1 to
258442c
Compare
This branch has not been deployed
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.
closes #23890
the runner gets each module's source map inlined as a base64 comment, and v8 compiles it along with the code even though the
prepareStackTraceinterceptor never reads it from there. it's 64-78% of the evaluated code for rxjs, effect and three. this addsdev.sourcemapForDebugger(defaulttrue, nothing changes). with it off, the server sends the map as a JSON string inViteFetchResult.sourceMap, the code has no comment, andcreateServerModuleRunnerdefaults toprepareStackTrace. runners with the'node'interceptor and runners that don't sendseparateSourceMapstill get inlined mapsimporting effect's 360 source modules in a fresh worker per pass, like vitest does: 10% faster per pass with the option off, within 1% of main with it on. unlike the issue's suggestion, the map stays inlined with the option on, since having each runner re-add the comment made that case 3-9% slower.
sourceMaphas the same name and type as vitest-dev/vitest#11750. added tests for both modes, the'node'interceptor, and a transform result shared by both kinds of runneri used AI to help write the change and the benchmarks, and reviewed it myself