Skip to content

Commit fd7703c

Browse files
fix: pass query params to OG image ISR function on Vercel (#2432)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f58c765 commit fd7703c

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

app/pages/compare.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ async function exportComparisonDataAsMarkdown() {
140140
}
141141
142142
defineOgImageComponent('Compare', {
143-
packages: () => packages.value,
143+
packages: () => packages.value.toSorted((a, b) => a.localeCompare(b)),
144144
emptyDescription: () => $t('compare.packages.meta_description_empty'),
145145
})
146146

nuxt.config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,13 @@ export default defineNuxtConfig({
129129
'/:pkg/.well-known/skills/**': { isr: 3600 },
130130
'/:scope/:pkg/.well-known/skills/**': { isr: 3600 },
131131
'/__og-image__/**': getISRConfig(3600),
132+
'/__og-image__/image/compare/**': {
133+
isr: {
134+
expiration: 3600,
135+
passQuery: true,
136+
allowQuery: ['packages', '_query'],
137+
},
138+
},
132139
'/_avatar/**': { isr: 3600, proxy: 'https://www.gravatar.com/avatar/**' },
133140
'/opensearch.xml': { isr: true },
134141
'/oauth-client-metadata.json': { prerender: true },

0 commit comments

Comments
 (0)