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

feat(nuxt): update to vue-bundle-renderer@0.4 #6210

Merged
merged 14 commits into from
Aug 7, 2022
Merged

Conversation

danielroe
Copy link
Member

@danielroe danielroe commented Jul 28, 2022

πŸ”— Linked issue

resolves nuxt/nuxt#13778, resolves nuxt/nuxt#13800, resolves nuxt/nuxt#14176

❓ 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 migrates fully to the vite manifest format, normalizing the webpack manifest at build time rather than runtime.

Finally, we run the actual renderer for SPA mode (but once only, with the result then reused for future requests), which avoids us having to rewrite renderer code within nuxt.

Removed from this PR for future iteration: add a nitro hook (nuxt:render:options) which allows to customise shouldPrefetch, shouldPreload and manifest.

πŸ“ Checklist

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

@danielroe danielroe added the enhancement New feature or request label Jul 28, 2022
@danielroe danielroe self-assigned this Jul 28, 2022
@netlify
Copy link

netlify bot commented Jul 28, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit 7c91f8c
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/62ebe9b0341d1f0008c5c9cb

@danielroe danielroe marked this pull request as draft July 28, 2022 21:30
packages/vite/src/manifest.ts Outdated Show resolved Hide resolved
@danielroe
Copy link
Member Author

danielroe commented Aug 4, 2022

TODO items from my perspective:

  • decide on whether we keep nuxt:render:options in this PR
  • release vue-bundle-renderer and update resolution in this PR

Then I think it's ready to leave draft.

@pi0
Copy link
Member

pi0 commented Aug 4, 2022

  • Released vue-bundle-renderer@0.4.0
  • You can remove customization hook for this PR πŸ‘πŸΌ

@danielroe danielroe marked this pull request as ready for review August 4, 2022 15:44
@pi0 pi0 changed the title feat(nuxt): adopt new vue-bundle-renderer feat(nuxt): update to vue-bundle-renderer@0.4 Aug 4, 2022
@pi0 pi0 merged commit 41d6f37 into main Aug 7, 2022
@pi0 pi0 deleted the feat/vue-bundle-renderer-v2 branch August 7, 2022 09:52
@dungonfq
Copy link

dungonfq commented Aug 8, 2022

Awesome work @danielroe @pi0 πŸ™ŒπŸ» πŸŽ‰ Thank u a lots! We'd waited for it for a long time.

When will we have documentation about how to customize shouldPrefetch, shouldPreload and manifest?

@danielroe
Copy link
Member Author

danielroe commented Aug 8, 2022

@dungonfq The ability to customise the renderer options was removed shortly before merge for faster iteration.

I will update the description.

@dungonfq
Copy link

dungonfq commented Aug 8, 2022

@danielroe could u give me where & how to use these new options shouldPrefetch, shouldPreload and manifest?

At first, I thought I can config them in nuxt.config.ts.

Copy link
Member Author

It is not yet possible.

@dungonfq
Copy link

dungonfq commented Aug 8, 2022

Thank @danielroe , my last confusion:

So, after u merge this PR + nuxt-contrib/vue-bundle-renderer#30. The prefetch issue will be fixed automatically, right?
nuxt/nuxt#13778

What I expected is all my modules weren't prefetched unnecessarily. Then when I load a page, only the required components/modules, which the page is using, will be fetched.
My issue before: nuxt/nuxt#14093

@danielroe
Copy link
Member Author

@dungonfq I don't know what you are asking, but if you are experiencing a new issue, please check that it is not resolved on the edge channel, and then open a new issue and I'll look into it πŸ™

@pi0 pi0 mentioned this pull request Aug 9, 2022
@kosmeln
Copy link

kosmeln commented Aug 11, 2022

Hello @danielroe .
Would you help me to understand if this ticket resolved nuxt/nuxt#13778 issue? I'm still experiencing it after upgrading to RC-7, but was thinking if this is something you mentioned that was branched off for the next release.

Copy link
Member Author

@kosmeln Yes, it should have resolved it. (But see nuxt/nuxt#13778.)

If you are experiencing a bug, please raise a new issue with a reproduction. πŸ™

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.