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

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

@danielroedanielroe commented Dec 8, 2022

Copy link
Copy Markdown
Member

🔗 Linked issue

resolvesnuxt/nuxt#15559, resolvesnuxt/nuxt#15735, resolvesnuxt/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.

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

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 approved these changes Dec 12, 2022

@pi0pi0 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 mainDec 12, 2022
@pi0
pi0 deleted the fix/vite-url branch December 12, 2022 11:45
@pi0pi0 mentioned this pull request Dec 15, 2022
6 tasks
@danielroedanielroe mentioned this pull request Jan 20, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3.xbugSomething isn't workingvite

Projects

None yet

3 participants

@danielroe@patak-cat@pi0