Skip to content

feat: upgrade devframe to v0.9.1 and adopt bare-specifier dock client script resolution - #534

Merged
antfu merged 2 commits into
mainfrom
seven-tables-live
Aug 18, 2026
Merged

feat: upgrade devframe to v0.9.1 and adopt bare-specifier dock client script resolution#534
antfu merged 2 commits into
mainfrom
seven-tables-live

Conversation

@antfubot

Copy link
Copy Markdown
Collaborator

What

Upgrades the shared devframe catalog ref from ^0.9.0 to ^0.9.1 and adopts the follow-up work named in devframes/devframe#257.

Why

Since v0.9's init/middleware refactor, hub assets are served verbatim ahead of Vite's transform pipeline, so a dock client script declared with a bare npm specifier (e.g. vue-tracer's importFrom: 'vite-plugin-vue-tracer/client/vite-devtools', used in playgrounds/core) reaches the browser's native import() unresolved and throws.

devframe v0.9.1 lets a Vite host advertise a client-module resolution template via initHub({ clientModuleResolution }). @devframes/vite/hub passes '/@id/{specifier}' by default, but Vite DevTools calls initHub directly, so it has to declare the template itself — PR #257 calls this out as the one-line adoption for @vitejs/devtools-kit.

How

createDevToolsHub now passes clientModuleResolution: '/@id/{specifier}', gated on context.viteServer. Only the serve path has a live Vite dev server whose /@id/ can resolve modules through the inspected app's graph; the standalone CLI and static build snapshots have no module graph, so the template stays undeclared there (preserving devframe's URL contract). Added a test covering both branches.

The rest of v0.9.1 (Services, hub-ui / json-render-ui / hub-next fixes) is additive and needs no adaption.

Verified with pnpm build && pnpm typecheck && pnpm test && pnpm lint.

This PR was created with the help of an agent.

…nt scripts

Bump the shared devframe ref to ^0.9.1 and adopt devframes/devframe#257.
Vite DevTools calls initHub directly, so it advertises the Vite
clientModuleResolution template ('/@id/{specifier}') itself — gated on a
live Vite dev server so bare-specifier dock client scripts (e.g.
vue-tracer's) resolve through the inspected app's module graph, while
the standalone CLI and static build snapshots keep the URL contract.
@pkg-pr-new

pkg-pr-new Bot commented Aug 18, 2026

Copy link
Copy Markdown

Open in StackBlitz

@vitejs/devtools

npm i https://pkg.pr.new/@vitejs/devtools@534

@vitejs/devtools-kit

npm i https://pkg.pr.new/@vitejs/devtools-kit@534

@vitejs/devtools-oxc

npm i https://pkg.pr.new/@vitejs/devtools-oxc@534

@vitejs/devtools-rolldown

npm i https://pkg.pr.new/@vitejs/devtools-rolldown@534

@vitejs/devtools-vite

npm i https://pkg.pr.new/@vitejs/devtools-vite@534

@vitejs/devtools-vitest

npm i https://pkg.pr.new/@vitejs/devtools-vitest@534

commit: 28efa4d

v0.9.1's Services feature (devframes/devframe#256) has the client read
the devframe:services shared state on load. A static snapshot doesn't
stand up the live hub, so nothing fired the services barrier that
publishes that state — leaving the RPC dump without a match and the
client logging a hard error. Fire context.services.ready() before
collecting the dump (idempotent; publishes an empty state when no
services are installed), mirroring the dock-renderers seeding.
@antfu
antfu merged commit 9230d05 into main Aug 18, 2026
10 checks passed
@antfu
antfu deleted the seven-tables-live branch August 18, 2026 07:16
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