fix: restore correct SSR sourcemaps for precompiled JSX#3827
Open
Hajime-san wants to merge 7 commits into
Open
fix: restore correct SSR sourcemaps for precompiled JSX#3827Hajime-san wants to merge 7 commits into
Hajime-san wants to merge 7 commits into
Conversation
Hajime-san
commented
May 30, 2026
| "@babel/core": "npm:@babel/core@^7.28.0", | ||
| "@babel/preset-react": "npm:@babel/preset-react@^7.27.1", | ||
| "@deno/loader": "jsr:@deno/loader@^0.4.0", | ||
| "@deno/loader": "jsr:@deno/loader@^0.5.0", |
Contributor
Author
There was a problem hiding this comment.
I updated the version because we needed the source map generation feature implemented in the PR.
Hajime-san
commented
May 31, 2026
Comment on lines
+625
to
+637
| // In dev, plugins may mutate app-level hooks such as the error interceptor | ||
| // after this module loads. Keep the fetch target refreshable so the server | ||
| // entry can pick up the latest app.handler() when that happens. | ||
| let handler = app.handler(); | ||
|
|
||
| export function refreshHandler() { | ||
| handler = app.handler(); | ||
| } | ||
|
|
||
| export default { | ||
| fetch: app.handler() | ||
| fetch(req, info) { | ||
| return handler(req, info); | ||
| } |
Contributor
Author
There was a problem hiding this comment.
fresh/packages/plugin-vite/tests/dev_server_test.ts
Lines 580 to 584 in 56faed1
This fix is for the flaky test of vite dev - source mapped stack traces.
|
|
||
| export function setErrorInterceptor(fn) { | ||
| internalErrorIntercept(app, fn); | ||
| refreshHandler(); |
Contributor
Author
There was a problem hiding this comment.
ditto for flaky test
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.
environments.ssr.build.sourcemapnot generate sourcemap collectly with @fresh/plugin-vite #3826