Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

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

Merged
merged 1 commit into from
Nov 2, 2022
Merged

Conversation

antfu
Copy link
Member

@antfu antfu commented Nov 1, 2022

πŸ”— Linked issue

Fix nuxt/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

codesandbox bot commented Nov 1, 2022

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

@antfu antfu requested a review from danielroe November 1, 2022 07:29
@netlify
Copy link

netlify bot commented Nov 1, 2022

βœ… Deploy Preview for nuxt3-docs ready!

Name Link
πŸ”¨ Latest commit d413242
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/6360cae013ba540008399c08
😎 Deploy Preview https://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.

@antfu antfu added the πŸ”¨ p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage label Nov 1, 2022
@pi0 pi0 changed the title fix(vite): forward vite middleware routes fix(vite): handle all vite middleware routes Nov 2, 2022
@pi0 pi0 merged commit b719f1b into main Nov 2, 2022
@pi0 pi0 deleted the fix/vite-middlewares branch November 2, 2022 09:05
@pi0 pi0 mentioned this pull request Nov 3, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3.x πŸ”¨ p3-minor-bug Priority 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