As soon as I set the routeRules in my project to isr: true, the url= query parameter is automatically appended to the URL. When switching back to ssr: true, this is not the case.
// nuxt.config.ts
export default defineNuxtConfig({
routeRules: {
'/**': { isr: true, headers: { 'cache-control': `public,max-age=${month},s-maxage=${month}` }, sitemap: { changefreq: 'weekly', priority: 0.5 } },
...
}
Removing the headers and sitemap parameters did not solve the problem.
There are two middleware files, but removing them did not solve the problem either.
Check this here
To replicate, reload any route and look at the address field of the browser.
This is only on Vercel, on localhost everything is fine.
// package.json
{
"name": "nuxt-app",
"private": true,
"type": "module",
"scripts": {
"prebuild": "./prebuild.sh",
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
},
"devDependencies": {
"@nuxt/devtools": "latest",
"@nuxt/image": "^1.7.0",
"@nuxt/ui": "^2.13.0",
"@nuxtjs/seo": "2.0.0-rc.10",
"@nuxtjs/sitemap": "^5.3.2",
"nuxt": "^3.12.3",
"nuxt-gtag": "^2.0.6",
"nuxt-hydration": "^0.6.4",
"nuxt-og-image": "3.0.0-rc.53",
"nuxt-schema-org": "^3.3.6",
"nuxt-simple-robots": "4.0.0-rc.17"
},
"dependencies": {
"@nuxt/ui-pro": "^1.2.0",
"@pinia/nuxt": "^0.5.1",
"pinia": "^2.1.7"
},
"overrides": {
"vue": "3"
}
}