1

I have some routes and looking for to have access a value through defining meta. And,i also should say i used Vite-plugin-pages for routing in Vue 3.

I read the plugin documentray, and add a route with yaml format as follows:

<route lang="yaml">
meta:
  path:'home'
</route>

But, when I console.log the Route.meta, its value is:

{0:`h',1:'o',2:'m',3:'e'}

How can define meta and get a valid response value?

amir tbi
  • 320
  • 2
  • 14

1 Answers1

0

According to the documentation and yaml syntax https://github.com/hannoeru/vite-plugin-pages

You need to remove the quotes, You can also use JSON format like

<route>
{
  name: "name-override",
  meta: {
    requiresAuth: false
  }
}
</route>
Alexis Gatuingt
  • 490
  • 6
  • 20