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

routeRules /** breaks nuxt-og-image #166

Open
agotfredsen82 opened this issue Feb 22, 2024 · 1 comment
Open

routeRules /** breaks nuxt-og-image #166

agotfredsen82 opened this issue Feb 22, 2024 · 1 comment

Comments

@agotfredsen82
Copy link

agotfredsen82 commented Feb 22, 2024

Hi. First of thank you for nuxt-og-image its great . Awesome work.

Here is a thing that took me a whole day to find after turning all code from nuxt-og-image inside out .

routeRules: {
"/**": { swr: 60 * 4 },
}

breaks "/__og-image__/image/" ...

when running this routeRule as one might do on dynamic websites with cms

The rule /** overwrites __og-image__ and throws a strange $.fetch is not a function that got me down the totally wrong rabbit hole where __og-image__/image/ did not work at all.

so to fix this I had to skip /** but that forced me to add LOTS of routeRules for the whole site

routeRules: {
"/about": { swr: 60 * 4 },
"/company": { swr: 60 * 4 },
etc etc etc
}

so it would be awesome if

routeRules: {
"/**": { swr: 60 * 4 },
}

could be used and that __og-image__ somehow is not affected by the "/**": { swr: 60 * 4 },

Best regards

@harlan-zw
Copy link
Collaborator

Hi, looks like an annoying one to debug. I'm not sure if there's anything I can do within the module to get this working, it's an upstream design issue with Nuxt / Nitro. I'll chat with the team next time I have a chance to try and come up with a solution.

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

No branches or pull requests

2 participants