Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.
/frameworkPublic archive

fix(vite): handle all vite middleware routes - #8601

Merged
pi0 merged 1 commit into
mainfrom
fix/vite-middlewares
Nov 2, 2022
Merged

fix(vite): handle all vite middleware routes#8601
pi0 merged 1 commit into
mainfrom
fix/vite-middlewares

Conversation

@antfu

@antfuantfu commented Nov 1, 2022

Copy link
Copy Markdown
Member

🔗 Linked issue

Fixnuxt/nuxt#15286

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Vite plugin might register their custom server middleware to the Vite dev server, for example:

#7989 introduced a regression that bypassed all custom vite middleware. This PR fixes it by checking the registered routes to Vite middleware and forwarding them as-is. This also removes the hard-code /__nuxt_vite_node__ handling.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@codesandbox

Copy link
Copy Markdown

CodeSandbox logoCodeSandbox logo Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@antfu
antfu requested a review from danielroeNovember 1, 2022 07:29
@netlify

netlifyBot commented Nov 1, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs ready!

NameLink
🔨 Latest commitd413242
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/6360cae013ba540008399c08
😎 Deploy Previewhttps://deploy-preview-8601--nuxt3-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@antfuantfu added the 🔨 p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage label Nov 1, 2022
@pi0pi0 changed the title fix(vite): forward vite middleware routesfix(vite): handle all vite middleware routesNov 2, 2022
pi0
pi0 approved these changes Nov 2, 2022
@pi0
pi0 merged commit b719f1b into mainNov 2, 2022
@pi0
pi0 deleted the fix/vite-middlewares branch November 2, 2022 09:05
@pi0pi0 mentioned this pull request Nov 3, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3.x🔨 p3-minor-bugPriority 3: a bug in an edge case that only affects very specific usage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RC12] UnoCSS Inspector is gone

3 participants

@antfu@pi0@danielroe