Skip to content

Add better handling for route collisions #155

Open
@BryceRussell

Description

@BryceRussell

Currently, when creating a theme using ATP, authors may end up creating routes that collide with routes from a user or integration. ATP should add better handling for routes that collide with each other.

Things to consider:

  • Theme routes have a higher priority than user defined routes, should user defined routes have a higher priority instead? ATP could prevent the injection of a route if it already exists inside the user's project.
  • Should ATP log or warn about colliding routes and explain how to fix?

Note: ATP injects routes inside the astro:config:setup hook which runs before Astro can provide any information about routes inside the project. The only way to get information about a user's routes it to read the file structure of the src/pages directory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ImprovementImprovement to an existing featurehelp wantedExtra attention is neededquestionFurther information is requestedtodoGoal for next major release

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions