NuxtN
Nuxt14mo ago
Surreal

i18n and route rules

I'm using the latest version of Nuxt + @nuxtjs/i18n configured with strategy: 'prefix_except_default' and recently noticed something odd - my route rules aren't being applied to prefixed paths. For example, routeRules: { '/foobar': { ssr: false } } only applies to /foobar, not the prefixed /fr/foobar path. It's relatively easy to work around by adding unique route rules for every language, for every path, but it does quickly multiply the number of route rules which is annoying.

I was just wondering - does anyone happen to know if this has always worked this way, or if it may be a newish bug? I've been running Nuxt + i18n in production with a half dozen languages for at least a year, but this is the first time I noticed the route rules only applying to the default language's (non-prefixed) path.
Was this page helpful?