Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(nuxt): proxy headers to islands + returned prerender hints #21740

Merged
merged 8 commits into from Jun 25, 2023

Conversation

danielroe
Copy link
Member

πŸ”— Linked issue

❓ 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)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

When using server components, currently they are unable to hint to Nitro to prerender resources. For example, a <nuxt-img> rendered in a server component will not output a statically generated image at the end of the build.

I think it makes sense to proxy both event context (e.g. auth headers) to islands as well as to set any headers on the response. (Honestly, I thought event fetch did the latter piece anyway, but it seems I am mistaken: cc: @pi0.)

πŸ“ Checklist

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

@danielroe danielroe marked this pull request as draft June 24, 2023 09:06
@danielroe danielroe changed the title fix(nuxt): proxy headers to/from island renders fix(nuxt): proxy headers to island renders + allow setting prerender hints Jun 24, 2023
@danielroe danielroe marked this pull request as ready for review June 24, 2023 13:45
Copy link
Member

@huang-julien huang-julien left a comment

Choose a reason for hiding this comment

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

I even thought that all headers were and should be proxied

@danielroe danielroe changed the title fix(nuxt): proxy headers to island renders + allow setting prerender hints fix(nuxt): proxy headers to islands + returned prerender hints Jun 25, 2023
@danielroe danielroe merged commit 88bc32d into main Jun 25, 2023
28 checks passed
@danielroe danielroe deleted the fix/island-headers branch June 25, 2023 16:38
@github-actions github-actions bot mentioned this pull request Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants