fix(bundled-dev): serve the rolldown runtime from the installed rolldown - #23568
Merged
Merged
Conversation
sapphi-red
reviewed
Sep 25, 2026
Comment on lines
+186
to
+193
| for (const name of fs.readdirSync(dir)) { | ||
| if (name.startsWith('experimental-runtime') && name.endsWith('.mjs')) { | ||
| files.set( | ||
| `${BUNDLED_DEV_ROLLDOWN_RUNTIME_DIR}/${name}`, | ||
| fs.readFileSync(path.join(dir, name), 'utf-8'), | ||
| ) | ||
| } | ||
| } |
Member
There was a problem hiding this comment.
[Non blocking] Relying on the file name feels difficult to ensure. Maybe we should be bundling to a single file. That would also reduce the number of requests needed.
Member
Author
There was a problem hiding this comment.
Agreed that we should bundle it in Rolldown. Based on that, Vite side should only be relying on a single runtime file exported by Rolldown. However, this should be released in minor Vite and minor Rolldown, otherwise it will again break the runtime, causing some runtime modules are not served and thus imported correctly, given the runtime was bundled at Vite build time.
Member
There was a problem hiding this comment.
Yep, let's do it in a minor.
sapphi-red
approved these changes
Sep 25, 2026
graphite-app Bot
pushed a commit
to rolldown/rolldown
that referenced
this pull request
Sep 25, 2026
<!-- - What is this PR solving? Write a clear and concise description. - Reference the issues it solves (e.g. `fixes #123`). - What other alternatives have you explored? - Are there any parts you think require more attention from reviewers? Also, please make sure you do the following: - Read the Contributing Guidelines at https://rolldown.rs/contribution-guide/. - Check that there isn't already a PR that solves the problem the same way. If you find a duplicate, please help us review it. - Update the corresponding documentation if needed. - Include relevant tests that fail without this PR but pass with it. If the tests are not included, explain why. Thank you for contributing to Rolldown! --> Harden the contract in vitejs/vite#23568, so as to keep `experimental-runtime*` files exported.
This was referenced Sep 25, 2026
graphite-app Bot
pushed a commit
to rolldown/rolldown
that referenced
this pull request
Sep 28, 2026
<!-- - What is this PR solving? Write a clear and concise description. - Reference the issues it solves (e.g. `fixes #123`). - What other alternatives have you explored? - Are there any parts you think require more attention from reviewers? Also, please make sure you do the following: - Read the Contributing Guidelines at https://rolldown.rs/contribution-guide/. - Check that there isn't already a PR that solves the problem the same way. If you find a duplicate, please help us review it. - Update the corresponding documentation if needed. - Include relevant tests that fail without this PR but pass with it. If the tests are not included, explain why. Thank you for contributing to Rolldown! --> Resolves vitejs/vite#23568 (comment) Merging this will not break Vite, given Vite now bundles `DevRuntime` into their own client when Vite is built and vitejs/vite#23587 will only be released in Vite minor.
This was referenced Sep 28, 2026
Merged
stipsan
added a commit
to sanity-io/plugins
that referenced
this pull request
Sep 28, 2026
…2.9 (#2034) <!-- CURSOR_AGENT_PR_BODY_BEGIN --> ### Description Ports [sanity-io/sanity#15055](sanity-io/sanity#15055) to this repo. `dev/test-studio` runs `sanity dev` with `unstable_bundledDev: true`, so it has the same exposure. Vite 8.3.1 inlines rolldown 1.2.9's browser dev runtime into `bundledDevClient.mjs`, but declares `rolldown: ~1.2.9`. rolldown 1.2.10 dropped the `kind` argument from `registerFactory` ([rolldown#10915](rolldown/rolldown#10915)). With rolldown 1.2.10 or 1.2.11 under Vite 8.3.1, every lazy `import()` and HMR update in bundled dev fails with `TypeError: factory.fn is not a function`. This PR bumps Vite from 8.2.2 to 8.3.1 and adds a `vite@8.3.1>rolldown: 1.2.9` override. The pin is scoped to 8.3.1 because the next Vite release serves the runtime from the installed rolldown ([vite#23568](vitejs/vite#23568)). Delete it when bumping past 8.3.1. _Testing in progress; description will be updated with results._ <!-- CURSOR_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-8a49abed-56bd-47f4-9e16-fbcde27d80eb?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-8a49abed-56bd-47f4-9e16-fbcde27d80eb&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Cody Olsen <stipsan@users.noreply.github.com>
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.
Fixes the problem in rolldown/rolldown#10982
This PR serves Rolldown runtime with the installed one, so as to fix the runtime inconsistency between Rolldown and VIte, given that Rolldown's version is not locked in Vite.
closes #23547