Repository navigation
feat: support bundled dev mode in ssr - #21626
Open
sheremet-va wants to merge 90 commits into
Open
sheremet-va wants to merge 90 commits into
sheremet-va wants to merge 90 commits into
Conversation
Contributor
|
Very excited to see the beginnings of this! |
sheremet-va
commented
Feb 13, 2026
sheremet-va
commented
Feb 13, 2026
sheremet-va
commented
Feb 13, 2026
…he runner code to minimise copypaste
sapphi-red
reviewed
Mar 31, 2026
graphite-app Bot
pushed a commit
to rolldown/rolldown
that referenced
this pull request
Aug 26, 2026
Adding a test case for vitejs/vite#21626 (comment) It seems it's failing.
graphite-app Bot
pushed a commit
to rolldown/rolldown
that referenced
this pull request
Aug 26, 2026
Adding a test case for vitejs/vite#21626 (comment) It seems it's failing.
graphite-app Bot
pushed a commit
to rolldown/rolldown
that referenced
this pull request
Aug 26, 2026
Adding a test case for vitejs/vite#21626 (comment) It seems it's failing.
RomanHotsiy
added a commit
to redocly-contrib/vite
that referenced
this pull request
Sep 30, 2026
Temporary fork of vite 8.3.1 with full bundle mode in SSR (vitejs#21626) plus the fixes it needed, until that lands upstream. Consumers alias it: `"vite": "npm:@redocly/vite@8.3.1"`. The version stays the upstream version (no prerelease tag) so `vite: ^8` peer ranges keep matching; fork-only bumps use patch numbers upstream will not reach (8.3.1001, …). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Hi @sheremet-va 🙌 , thanks again fo this work! I finally tried the branch on a real SSR app (Hono + React streaming SSR through environments.ssr.runner:
and it is mainly working! There are a few issues found by Claude which we verified and fixed on our side to make it work.
|
# Conflicts: # packages/vite/src/client/client.ts # packages/vite/src/module-runner/runner.ts # packages/vite/src/node/server/bundledDev.ts # packages/vite/src/node/ssr/fetchModule.ts # packages/vite/src/node/ssr/runtime/__tests__/server-hmr.spec.ts # packages/vite/src/node/ssr/runtime/__tests__/server-runtime.spec.ts # packages/vite/src/node/ssr/runtime/__tests__/utils.ts
This was referenced Oct 6, 2026
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.
TODO
wsinjection on rolldown side https://github.com/rolldown/rolldown/blob/d7f919c18980e6b4a26d06bd071d7cf14cf810a7/crates/rolldown_plugin_hmr/src/hmr_plugin.rsconst __require = createRequire()in rolldown (somewhere)wsdependency from the playgroundI am exploring how full bundle mode can be supported in SSR. At the moment the goal is to support
environments.ssr.runner.importandenvironment.fetchModule. Module graph,transformRequest,pluginContainerare out of scope of this PR, but they will be revisited later.Known quirks (to discuss)
runner.import(url)is not resolved withresolveIdlike it is done usually. Instead it accepts:rolldownOptions.input/(/entry-point.jsvs./entry-point.js)urlmust be an actual filename or a URL with the extension at the endimport.meta.url,import.meta.filenameandimport.meta.dirnamereference "would be" (or "virtual") files, these are the URLs that would exist if vite kept the bundle on the file system. Doing something likereadFileSync(import.meta.filename)will throw an error because the file does not exist on disk{ ourDir: './dist' }, the filename would be something like<root>/dist/asset/chunk-1.jsTo enable full bundle mode in SSR, add this to the config: