R
R
Roman2021-02-20 16:29:34
Vue.js
Roman, 2021-02-20 16:29:34

Is it possible to make the created files automatically become available through vue-router, how?

I make links to new paths in the image and likeness:

router/index.js

{
    path: '/about',
    name: 'About',
    component: () => import('../views/About.vue')
  },


And how can I create a file in the 'views' folder, say, Test.vue, and it will be automatically available under /test

?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Anton, 2021-02-20
@Fragster

nuxtjs will help here (but they seem to have broken the site with the docks :) ) https://nuxtjs.org/docs/2.x/features/file-system-r... after each transition, you need to refresh the page (at least in firefox)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question