Static GitHub Issues

[2865] routes should not be called on internal files

prev: Auth_Routes example (source code version)
next: Content not rendered

Hi I extend my routes to have kind of a catch all for my custom render of index.vue:

router:{
extendRoutes (routes, resolve) {
      routes.push({
        name: 'article',
        path: '*',
        component: resolve(__dirname, 'src/pages/index.vue')
      })
    }
}

On SSR I found out that the index.vue is getting called on paths it should be ignored: robots.txt, styles.css.map and several more. How is it possible to extend routes and only match the path based on real strings/paths or how can I ignore specific route params/paths inside of the index.vue component? I tried:

path:'/:foo*'

But it still matches any path

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2489">#c2489</a>)</em></sub></div>