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

fix(vite): skip _only_ vite transform middleware - #9602

Merged
pi0 merged 1 commit into
mainfrom
fix/vite-url
Dec 12, 2022
Merged

fix(vite): skip _only_ vite transform middleware#9602
pi0 merged 1 commit into
mainfrom
fix/vite-url

Conversation

@danielroe

@danielroe danielroe commented Dec 8, 2022

Copy link
Copy Markdown
Member

🔗 Linked issue

resolves nuxt/nuxt#15559, resolves nuxt/nuxt#15735, resolves nuxt/nuxt#15510

❓ 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

This PR avoids modifying the URL for vite middleware injected prior to viteTransformMiddleware, instead injecting another middleware to make the modification within the vite stack.

The underlying mechanism of skipping the vite transform hasn't changed, just the time of making the change.

cc: @patak-dev

📝 Checklist

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

@danielroe danielroe added bug Something isn't working vite labels Dec 8, 2022
@danielroe
danielroe requested a review from pi0 December 8, 2022 15:39
@danielroe danielroe self-assigned this Dec 8, 2022
@codesandbox

codesandbox Bot commented Dec 8, 2022

Copy link
Copy Markdown

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

@patak-cat

Copy link
Copy Markdown

For reference, the function name viteTransformMiddleware is part of Vite's public API and won't be changed except for a breaking change in a Major.

@pi0 pi0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Couldn't find a better solution.

@pi0
pi0 merged commit 050c6df into main Dec 12, 2022
@pi0
pi0 deleted the fix/vite-url branch December 12, 2022 11:45
@pi0 pi0 mentioned this pull request Dec 15, 2022
6 tasks
@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe mentioned this pull request Jan 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3.x bug Something isn't working vite

Projects

None yet

3 participants