Skip to content

Defining options for routes without a component #33

@posva

Description

@posva

Creating folders create routes and any file inside them becomes a nested route. This wasn't possible before v4.1 but now it makes sense to allow defining meta properties (mainly but also any other route property) at this level

This could maybe be achieved with a special file users/__route.js that exports some properties like name, meta, etc (the same as in the <route> block)

Currently it's possible to create a nested route thanks to groups:

  • /pages/(my-group).vue
  • /pages/(my-group)/users.vue

The (my-group).vue allows to define common options:

<script setup lang="ts">
definePage({})
</script>

<template>
  <RouterView />
<template>

unfortunately, it creates a name for the route. Using a special file would allow to:

  • use a plain js/ts file
  • Not create a name by default

I'm tracking here these issues:

Metadata

Metadata

Assignees

No one assigned

    Labels

    has workaroundhas a temporary fix to get around the problem⚡️ enhancementimprovement over an existing feature

    Projects

    Status

    🔖 Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions