Skip to content

feat(bundled-dev): support import.meta.hot.acceptExports - #23463

Draft
h-a-n-a wants to merge 2 commits into
mainfrom
feat/bundled-dev-accept-exports
Draft

h-a-n-a wants to merge 2 commits into
mainfrom
feat/bundled-dev-accept-exports

Conversation

@h-a-n-a

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

Copy link
Copy Markdown
Member

Added support for import.meta.hot.acceptExports in bundled-dev mode.

Blocked by rolldown/rolldown#10856, and upgrading to rolldown@1.2.12

h-a-n-a added a commit to rolldown/rolldown that referenced this pull request Sep 25, 2026
`import.meta.hot.acceptExports(names, cb)` lets a module accept its own
change only for the listed exports. An importer that reads only those
exports is left alone. An importer that reads any other export still
gets the update.

Rolldown ships the export names each importer reads, so the browser can
make the same decision. For each static import edge, the export names
the importer reads. `"*"` means the whole namespace (`import * as ns`,
`export * from`, `require()`, non-JS records). An empty list means a
side-effect-only import. Names are listed only for edges into a module
that calls `acceptExports`, and `bindings` holds only the rows that have
such an edge. A missing row or entry means `"*"`.

```js
// header.js:  import { count } from './counter.js'
// title.js:   import { label } from './counter.js'
// main.js:    import './header.js'; import './title.js'
__rolldown_runtime__.registerGraph({
  ids: ["main.js", "header.js", "title.js", "counter.js"],
  localCount: 4,
  edges:    [[1, 2], [3], [3], []],
  bindings: { 1: [["count"]], 2: [["label"]] },
  dynamicEdges: [[], [], [], []],
})
```

Vite: vitejs/vite#23463

closes #10061
@h-a-n-a
h-a-n-a force-pushed the feat/bundled-dev-accept-exports branch from 6d9445a to 39bfe2b Compare October 2, 2026 19:05

This branch has not been deployed

No deployments
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.

1 participant