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: next route handler extensions #606

Merged
merged 1 commit into from
May 2, 2024
Merged

Conversation

Jaxenormus
Copy link
Contributor

@Jaxenormus Jaxenormus commented Apr 27, 2024

This is unfortunately undocumented like most next.js quirks but this does work if you are making an og image route handler kinda like the opengraph-image convention but with less magic

@Jaxenormus Jaxenormus marked this pull request as ready for review April 27, 2024 12:57
@webpro
Copy link
Collaborator

webpro commented Apr 29, 2024

Thanks for the PR, @Jaxenormus. Any chance you could share what routes exactly aren't matching?

There's https://knip.dev/reference/plugins/vercel-og but that's not enough I guess. What related dependencies are listed in package.json?

@Jaxenormus
Copy link
Contributor Author

Jaxenormus commented Apr 29, 2024

Thanks for the PR, @Jaxenormus. Any chance you could share what routes exactly aren't matching?

There's knip.dev/reference/plugins/vercel-og but that's not enough I guess. What related dependencies are listed in package.json?

in our use case the route that did not match was apps/hub/app/api/images/[companyRoute]/og.png/route.tsx where the route was sending an ImageResponse which lets you return jsx but to do so the files has to be a tsx file

@webpro webpro merged commit 9d05b6a into webpro-nl:main May 2, 2024
11 of 14 checks passed
@webpro
Copy link
Collaborator

webpro commented May 2, 2024

Alright, thanks for the clarification!

@webpro
Copy link
Collaborator

webpro commented May 2, 2024

🚀 This pull request is included in v5.12.0. See Release 5.12.0 for release notes.

Using Knip in a commercial project? Please consider sponsoring me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants