nuxt / nuxt

The Intuitive Vue Framework.

Home Page:https://nuxt.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

routeRules /** swr crashed ipx provider

ovchinnikov-lxs opened this issue · comments

Environment

  • Operating System: Darwin
  • Node Version: v20.10.0
  • Nuxt Version: 3.11.2
  • CLI Version: 3.11.1
  • Nitro Version: 2.9.6
  • Package Manager: pnpm@8.10.5
  • Builder: -
  • User Config: extends, modules, css, runtimeConfig
  • Runtime Modules: @nuxtjs/i18n@8.2.0
  • Build Modules: -

Reproduction

Describe the bug

  1. Add module nuxt/image
  2. add to nuxt.config this code
 routeRules: {
            '/**': {
                swr: 300,
            },
            '/_ipx/**': {
                swr: false,
            },
        },
  1. /_ipx/** images paths will crash in next page reload

Additional context

No response

Logs

No response

Does it work if you also set cache: false?

@danielroe Thank you very much it's work!❤️ So, can we use all fields from routeRules in Nitro? Because in the documentation, cache field is not listed (although I now realize swr is a shortcut). If so, perhaps we should supplement the documentation with a link to Nitro?