Conversation
…are }) and Nuxt module Adds `devMiddleware` to `createVitePlugin` so a host Vite/Nuxt/Astro app can own the SPA while devframe owns the RPC + WS backend. The plugin starts `createDevServer` in bridge mode (no sirv mount) on a resolved port and serves `<base>__connection.json` via Vite middleware so the host-served SPA can discover the WS endpoint. The `@devframes/nuxt` module gains a matching `devframe` + `devMiddleware` pair. Passing `devframe` is the only step required — the bridge defaults on, auto-reads `nuxt.options.devServer.host` so `nuxt dev --host` propagates, and tears down cleanly on Vite restart / Nuxt close. `createDevServer`'s `distDir` is now truly optional (bridge mode). New `DF0033` (warn) covers bridge startup failures. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for devfra ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
commit: |
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.
Description
Adds a
devMiddlewareoption tocreateVitePluginso any Vite-based host (Nuxt, Astro, SolidStart, plain Vite) can own the SPA while devframe owns the RPC + WS backend — the plugin startscreateDevServerin bridge mode on a resolved port and serves<base>__connection.jsonvia Vite middleware. The@devframes/nuxtmodule gains a matchingdevframe+devMiddlewarepair (default-on wheneverdevframeis set, auto-readsnuxt.options.devServer.hostsonuxt dev --hostpropagates, clean teardown on Vite restart / Nuxt close).createDevServer'sdistDiris now truly optional — bridge mode skips the sirv SPA mount. NewDF0033(warn) covers bridge startup failures, with docs added underdocs/errors/and a new "Dev-time RPC bridge" section in the Nuxt guide.Linked Issues
Additional context
This unblocks Nuxt-based devtools (e.g.
eslint-config-inspector) runningnuxt devwithout hand-rolling a ~40-line Vite plugin per project. Backwards compatible:createVitePlugindefaultsdevMiddleware: false, and the Nuxt module's bridge is gated on adevframebeing provided.🤖 Generated with Claude Code