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

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

Merged
pi0 merged 14 commits into
mainfrom
feat/vue-bundle-renderer-v2
Aug 7, 2022
Merged

feat(nuxt): update to vue-bundle-renderer@0.4#6210
pi0 merged 14 commits into
mainfrom
feat/vue-bundle-renderer-v2

Conversation

@danielroe

@danielroe danielroe commented Jul 28, 2022

Copy link
Copy Markdown
Member

🔗 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

netlify Bot commented Jul 28, 2022

Copy link
Copy Markdown

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
@danielroe
danielroe force-pushed the feat/vue-bundle-renderer-v2 branch from 6273c7d to 0d1b718 Compare August 2, 2022 09:06
@danielroe
danielroe force-pushed the feat/vue-bundle-renderer-v2 branch from 649ae76 to 79cec50 Compare August 3, 2022 12:54
Comment thread packages/nuxt/src/core/runtime/nitro/renderer.ts Outdated
Comment thread packages/vite/src/manifest.ts Outdated
@danielroe

danielroe commented Aug 4, 2022

Copy link
Copy Markdown
Member Author

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

pi0 commented Aug 4, 2022

Copy link
Copy Markdown
Member
  • 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

dungonfq commented Aug 8, 2022

Copy link
Copy Markdown

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

danielroe commented Aug 8, 2022

Copy link
Copy Markdown
Member Author

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

I will update the description.

@dungonfq

dungonfq commented Aug 8, 2022

Copy link
Copy Markdown

@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.

@danielroe

Copy link
Copy Markdown
Member Author

It is not yet possible.

@dungonfq

dungonfq commented Aug 8, 2022

Copy link
Copy Markdown

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
Copy Markdown
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

kosmeln commented Aug 11, 2022

Copy link
Copy Markdown

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.

@danielroe

Copy link
Copy Markdown
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.

Labels

3.x enhancement New feature or request

Projects

None yet

4 participants