Title: No clean path to mount a devtools-kit `devtools.setup` plugin (embedded dock) under Nuxt SSR (0.6) · Issue #289 · devframes/devframe · GitHub
Open Graph Title: No clean path to mount a devtools-kit `devtools.setup` plugin (embedded dock) under Nuxt SSR (0.6) · Issue #289 · devframes/devframe
X Title: No clean path to mount a devtools-kit `devtools.setup` plugin (embedded dock) under Nuxt SSR (0.6) · Issue #289 · devframes/devframe
Description: Summary There's no clean path to surface a @vitejs/devtools-kit-based devtool (one that integrates via the Vite plugin.devtools.setup(ctx) hook) inside a Nuxt SSR app on devframe 0.9 / devtools-kit 0.6. The embedded dock silently never l...
Open Graph Description: Summary There's no clean path to surface a @vitejs/devtools-kit-based devtool (one that integrates via the Vite plugin.devtools.setup(ctx) hook) inside a Nuxt SSR app on devframe 0.9 / devtools-kit...
X Description: Summary There's no clean path to surface a @vitejs/devtools-kit-based devtool (one that integrates via the Vite plugin.devtools.setup(ctx) hook) inside a Nuxt SSR app on devframe 0.9 / devtools...
Opengraph URL: https://github.com/devframes/devframe/issues/289
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"No clean path to mount a devtools-kit `devtools.setup` plugin (embedded dock) under Nuxt SSR (0.6)","articleBody":"## Summary\n\nThere's no clean path to surface a **`@vitejs/devtools-kit`-based devtool** (one that integrates via the Vite `plugin.devtools.setup(ctx)` hook) inside a **Nuxt SSR** app on devframe 0.9 / devtools-kit 0.6. The embedded dock silently never loads, and the documented Nuxt integration (`@devframes/nuxt/hub`) only accepts raw `DevframeDefinition`s, not kit `devtools.setup` plugins.\n\n## Context\n\nI'm migrating a Vite plugin (a Storybook devtool) from `@vitejs/devtools` 0.3.x → 0.6.0 (devframe 0.9). It integrates the standard way: a Vite plugin exposing `devtools: { setup(ctx) { ctx.docks.register(...); ctx.views.hostStatic(...); ctx.rpc.register(...); ... } }`. This works great in plain-Vite SPAs (React/Vue).\n\n## What breaks under Nuxt SSR\n\nIn 0.3.x the embedded dock reached the browser through **Vite's module graph** — Nuxt exposed it at `/_nuxt/@id/__x00__virtual:vite-devtools-injection`, so injecting that import into Nuxt's head made the dock appear.\n\nIn 0.6, `@vitejs/devtools`' injection plugin instead injects a runtime `\u003cscript type=\"module\" src=\"/__devtools/embedded.js\">`, and `embedded.js` (plus `/__devtools-client-imports.js`) is served by the **hub connect middleware** mounted on the Vite dev server. Under Nuxt SSR, **Nitro owns the request path and does not forward `/__devtools/*` to Vite's middleware**, so all of these return the app's SPA HTML instead of the dock assets:\n\n```\nGET /__devtools/ -> 200 text/html (Nuxt page, not the dock)\nGET /__devtools/embedded.js -> 200 text/html (Nuxt page, not JS)\nGET /__devtools-client-imports.js -> 200 text/html (Nuxt page)\n```\n\nThe old module-graph virtual id is gone (`/_nuxt/@id/__x00__virtual:vite-devtools-injection` -> 404), so the previous mechanism no longer works either. Net effect: the in-page/client side works, but the embedded dock UI never loads in Nuxt SSR.\n\n## Why `@devframes/nuxt` doesn't cleanly cover this\n\n`@devframes/nuxt/hub` is exactly the right shape (wires `@devframes/vite/hub` into Nuxt's Vite server and injects `\u003cbase>embedded.js`), **but `viteDevframeHub` mounts raw `DevframeDefinition`s** (`devframes: InitHubOptions['devframes']`) — it does not consume `@vitejs/devtools-kit` `plugin.devtools.setup(ctx)` plugins. So a kit-based devtool would have to be **re-expressed as a standalone `defineDevframe()` definition** and mounted a second, different way just for Nuxt, in addition to the kit path it already uses under `@vitejs/devtools` everywhere else.\n\n## Asks / questions\n\n1. Is there (or can there be) a supported way to mount a **kit `devtools.setup(ctx)` plugin** into a Nuxt SSR app so its dock loads — e.g. `@vitejs/devtools` documenting a Nitro dev proxy for `/__devtools/*` (+ the RPC WebSocket), or a kit→`DevframeDefinition` adapter usable with `@devframes/nuxt/hub`?\n2. If the intended answer is \"re-express as `defineDevframe()` and use `@devframes/nuxt/hub` (or `@nuxt/devtools`)\", could the migration docs call this out explicitly? The 0.6 change from module-graph injection to middleware-served `embedded.js` is an easy silent-break for SSR hosts.\n\n## Minor, possibly related\n\nA `DF8111` warning (\"dock declares the bare-specifier client script `…`, but this host advertises no client-module resolution\") fires even in **plain Vite**, where the dock works fine. If that's expected under Vite (client modules resolve via `/@id/{specifier}`), the warning may be a false positive worth gating; if not, it may hint at the same client-script-resolution gap on non-Vite hosts.\n\nEnvironment: `@vitejs/devtools` 0.6.0, `@vitejs/devtools-kit` 0.6.0, `devframe`/`@devframes/hub` 0.9.5, Vite 8, Nuxt 4.\n","author":{"url":"https://github.com/antfubot","@type":"Person","name":"antfubot"},"datePublished":"2026-08-25T01:10:27Z","url":"https://github.com/devframes/devframe/issues/289"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0551a74a-4615-6461-2990-19ff8e721c56 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E6E2:217101:2ED59:41DD5:6AFB72C4 |
| html-safe-nonce | b3a20befb57d16234bf4bfa6a53411fdad1703f1cf1a85e18cef3c7b333e3ab6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNkUyOjIxNzEwMToyRUQ1OTo0MURENTo2QUZCNzJDNCIsInZpc2l0b3JfaWQiOiIyMTI1OTQ5NDYxMTYxODAwMzg4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | b1e3a2162b16d9495302b10295b2d77d541beaffc9f65ca24686e7f44fa79004 |
| hovercard-subject-tag | issue:5240972991 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/devframes/devframe/289/issue_layout |
| twitter:image | https://opengraph.githubassets.com/465220c0c80d9824bb0c47d246205354eeae0bc0e4c8de9c315085382d65f437/devframes/devframe/issues/289 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/465220c0c80d9824bb0c47d246205354eeae0bc0e4c8de9c315085382d65f437/devframes/devframe/issues/289 |
| og:image:alt | Summary There's no clean path to surface a @vitejs/devtools-kit-based devtool (one that integrates via the Vite plugin.devtools.setup(ctx) hook) inside a Nuxt SSR app on devframe 0.9 / devtools-kit... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | antfubot |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0e29e7974fdda2feeaf5c891efd4b23b0734b23480232b62c7bdef13f40b5b48 |
| turbo-cache-control | no-preview |
| go-import | github.com/devframes/devframe git https://github.com/devframes/devframe.git |
| octolytics-dimension-user_id | 279879373 |
| octolytics-dimension-user_login | devframes |
| octolytics-dimension-repository_id | 1231722386 |
| octolytics-dimension-repository_nwo | devframes/devframe |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1231722386 |
| octolytics-dimension-repository_network_root_nwo | devframes/devframe |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2e8872b770cc4d5d0cc1f2026afab747a268e2ce |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width