Skip to content

feat(dev): add hotUpdate dev option to gate the hotUpdate hook - #10837

Merged
graphite-app[bot] merged 1 commit into
mainfrom
feat/dev-hot-update-hook-option
Sep 8, 2026
Merged

graphite-app[bot] merged 1 commit into
mainfrom
feat/dev-hot-update-hook-option

Conversation

@h-a-n-a

@h-a-n-a h-a-n-a commented Sep 8, 2026 •

Copy link
Copy Markdown
Member

Add dev.hotUpdate option to gate hotUpdate hook.

h-a-n-a commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

How to use the Graphite Merge Queue

Add the label graphite: merge-when-ready to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@netlify

netlify Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for rolldown-rs ready!

Name Link
🔨 Latest commit bba03da
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/6a9f9b1c81fbb900083c37a8
😎 Deploy Preview https://deploy-preview-10837--rolldown-rs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://feat-dev-hot-update-hook-option-rolldown-rs.voidzero-docs.workers.dev (commit bba03da)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://0d2430eb-rolldown-rs.voidzero-docs.workers.dev bba03da 2026-09-08T05:22:56.137Z Visit the dashboard ↗
  • Build: Failed ❌

View logs ↗
a9554f0 2026-09-08T04:30:40.043Z View logs ↗
  • Build: Failed ❌

View logs ↗
a4a2956 2026-09-08T04:28:16.274Z View logs ↗

@h-a-n-a
h-a-n-a force-pushed the feat/dev-hot-update-hook-option branch from a4a2956 to a9554f0 Compare September 8, 2026 04:28
@h-a-n-a
h-a-n-a marked this pull request as ready for review September 8, 2026 04:39

h-a-n-a commented Sep 8, 2026 •

Copy link
Copy Markdown
Member Author

Merge activity

@codspeed

codspeed Bot commented Sep 8, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 7 untouched benchmarks
⏩ 10 skipped benchmarks1


Comparing feat/dev-hot-update-hook-option (a9554f0) with main (2fab491)2

Open in CodSpeed

Footnotes

  1. 10 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

  2. No successful run was found on main (b848d62) during the generation of this report, so 2fab491 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

…10837)

<!--
- 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!
-->

Add `dev.hotUpdate` option to gate `hotUpdate` hook.
@graphite-app
graphite-app Bot force-pushed the feat/dev-hot-update-hook-option branch from a9554f0 to bba03da Compare September 8, 2026 05:20
@graphite-app
graphite-app Bot merged commit bba03da into main Sep 8, 2026
37 checks passed
@graphite-app
graphite-app Bot deleted the feat/dev-hot-update-hook-option branch September 8, 2026 05:26
@rolldown-guard rolldown-guard Bot mentioned this pull request Sep 9, 2026
shulaoda added a commit that referenced this pull request Sep 9, 2026
## [1.2.8] - 2026-09-09

### 🚀 Features

- dev: add `hotUpdate` dev option to gate the `hotUpdate` hook (#10837) by @h-a-n-a
- docs: add wrangler (#10821) by @mdong1909

### 🐛 Bug Fixes

- dev: clean stale dynamic entry references after partial scans (#10846) by @shulaoda
- include external wildcard re-exports in `OutputChunk.imports` (#10845) by @isker

### 📚 Documentation

- document dynamic entry cache merging after partial scans (#10848) by @shulaoda

### ⚡ Performance

- cache `getModuleInfo` during code splitting (#10838) by @hyfdev

### 🧪 Testing

- dev: cover stale dynamic entry references after partial scans (#10847) by @shulaoda

### ⚙️ Miscellaneous Tasks

- deps: update dependency @napi-rs/cli to v3.9.0 (#10816) by @renovate[bot]
- deps: update dependency rolldown-plugin-dts to v0.28.5 (#10827) by @renovate[bot]
- deps: update dependency vite-plus to v0.3.1 (#10842) by @renovate[bot]
- deps: upgrade oxc to 0.149.0 (#10834) by @camc314
- deps: update rust crates (#10830) by @renovate[bot]
- deps: update npm packages (#10832) by @renovate[bot]
- deps: update crate-ci/typos action to v1.50.1 (#10824) by @renovate[bot]
- deps: update test262 submodule for tests (#10836) by @rolldown-guard[bot]
- deps: update github actions (#10831) by @renovate[bot]
- deps: update dependency rust to v1.98.1 (#10819) by @renovate[bot]

### ❤️ New Contributors

* @isker made their first contribution in [#10845](#10845)

Co-authored-by: shulaoda <[email protected]>
shulaoda added a commit that referenced this pull request Oct 7, 2026
…tion via hotUpdate (#10550)

Part of #10059

## Problem

Vite's JS plugin keeps the result of a glob fresh from a `hotUpdate`
hook. Under bundled dev the native plugin replaces it, and the native
plugin only implemented `transform`.

#10549 makes the file events arrive, but nothing maps them to the module
that owns the glob.

## What this PR does

Implements `hotUpdate` in the native plugin, the way Vite's plugin does
it.

- Each `import.meta.glob` call gets one matcher in dev mode. It is built
with globstar from the absolute globs of the call, with the options Vite
passes to picomatch. `dot` follows `exhaustive`, case folding follows
`caseSensitive`, and `**/node_modules/**` is excluded unless
`exhaustive` is set.
- The glob syntax in the literal part of a path is escaped, like Vite's
`globSafeResolvedPath`.
- For a created or deleted file, the hook adds every module with a
matcher that matches the file to the affected set.
- A content edit is declined. It cannot change which files a glob
matches.

The walk in `transform` is not changed. It still matches with
`fast_glob`.

## Note

The `hotUpdate` hook is off by default (`dev.hotUpdate`, #10837), and
Vite does not pass the option yet (vitejs/vite#22956). This PR takes
effect once the option is on.

The hook is as simple as Vite's, so it inherits what the watcher and the
engine do differently from Vite:

- A file saved by renaming a temporary file over it is reported as
created, so the module of the glob is updated with it.
- A deleted directory is reported without its files, and no glob matches
a directory.
- The matchers of a deleted module stay, like in Vite, but the engine
still knows the module.

This branch was previously deployed

1 inactive deployment
void — bba03da8 Deployed Sep 8, 2026 by graphite-app[bot] via Deploy to Void #4292
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants