B
B
BonBon Slick2020-02-09 06:56:15
Vue.js
BonBon Slick, 2020-02-09 06:56:15

Nuxt folder index.vue routing?

pages -> people -> index.vue + _index.js
folders:
pages - people
files in index folder and its js code are separated.
Nuxt spits out this

{
    path: "/people/:index",
    component: '...._index.js',
    children: [{
      path: "",
       component: '...._index.vue,
      name: "people"
    }]
  },

when you need it
{
    path: "/people",
    component: '...._index.vue,
  },


I know about _ and, renaming the file will help, I just want to remove this behavior. And if you remove it, how then to create childs with dynamic parameters?
Or at least then fix so that nuxt would only read .vue files for components?

For I find this "feature" out of the box by default, rather a bug.
Yes, I know that templating is in JS, but in this case it is inappropriate.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question