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

fix(vite-node): on-demand manifest#5017

Merged
pi0 merged 7 commits intomainfrom
fix/vite-node-manifest-2
Jun 27, 2022
Merged

fix(vite-node): on-demand manifest#5017
pi0 merged 7 commits intomainfrom
fix/vite-node-manifest-2

Conversation

@antfu
Copy link
Copy Markdown
Member

@antfu antfu commented May 17, 2022

🔗 Linked issue

With the previous cache change in rc.3, the manifest is always cached without invalidation, causing FOUC and development changes never updates. This PR partially fixed it by opt-out renderer cache in development, we will still have a single FOUC on the initial request after the server starts. The root cause is that with the on-demand of vite-node, the graph is only known after rendering the route, while vue-bundle-renderer requires manifest before doing that. nuxt-contrib/vue-bundle-renderer#31 is required to completely fix it.

❓ 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

📝 Checklist

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

@antfu antfu mentioned this pull request Jan 19, 2023
4 tasks
@netlify
Copy link
Copy Markdown

netlify bot commented May 17, 2022

Deploy Preview for nuxt3-docs canceled.

Name Link
🔨 Latest commit dfa8d65
🔍 Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/62a3a699d142cf0008834786

@atinux atinux requested a review from pi0 May 18, 2022 06:19
@pi0
Copy link
Copy Markdown
Member

pi0 commented May 20, 2022

This is a nice fix but also means we have to initialize whole renderer instance each time during development mode which is a performance overhead. Maybe we can allow manifest as function within vue-bundle-renderer?

@pi0 pi0 added enhancement New feature or request pending vite upstream 🍰 p2-nice-to-have Priority 2: nothing is broken but it's worth addressing labels May 20, 2022
@antfu
Copy link
Copy Markdown
Member Author

antfu commented May 20, 2022

Yes, we will need nuxt-contrib/vue-bundle-renderer#31, we could have it in vue-bundle-renderer first and then I will update this PR

@antfu antfu marked this pull request as draft June 10, 2022 11:42
@pi0
Copy link
Copy Markdown
Member

pi0 commented Jun 10, 2022

Upstream PR released :)

@antfu antfu changed the title fix(vite-node): do not cache manifest loading fix(vite-node): on-demand manifest Jun 10, 2022
@antfu antfu marked this pull request as ready for review June 10, 2022 12:05
Copy link
Copy Markdown
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

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

LGTM

@pi0 pi0 merged commit 7efdb48 into main Jun 27, 2022
@pi0 pi0 deleted the fix/vite-node-manifest-2 branch June 27, 2022 12:08
@pi0 pi0 mentioned this pull request Jul 11, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
@wattanx wattanx mentioned this pull request Sep 8, 2024
7 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3.x enhancement New feature or request 🍰 p2-nice-to-have Priority 2: nothing is broken but it's worth addressing vite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants