posva / unplugin-vue-router

Next Generation file based typed routing for Vue Router
https://uvr.esm.is
MIT License
1.69k stars 82 forks source link

Will the path be returned as an absolute path? #538

Open Mi-liu opened 2 weeks ago

Mi-liu commented 2 weeks ago

Can there be a configuration that controls absolute or relative? This is very helpful when using UI libraries and flat routing

// This is now
{
  path: '/test',
  children:[{
    path: 'demo'
  }]
}

I hope it's the same as vite plugin pages

// vite.config.ts
plugins: [
 VueRouter({
   // Type: 'absolute' | 'relative'
   importPath: 'absolute',  
 })
]

// to
{
  path: '/test',
  children:[{
    path: '/test/demo'
  }]
}
posva commented 2 weeks ago

What is the use case?