Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add better handling for route collisions #155

Open
BryceRussell opened this issue Jul 24, 2024 · 0 comments
Open

Add better handling for route collisions #155

BryceRussell opened this issue Jul 24, 2024 · 0 comments
Labels
help wanted Extra attention is needed Improvement Improvement to an existing feature question Further information is requested todo Goal for next major release

Comments

@BryceRussell
Copy link
Member

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.

@BryceRussell BryceRussell added help wanted Extra attention is needed question Further information is requested Improvement Improvement to an existing feature todo Goal for next major release labels Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed Improvement Improvement to an existing feature question Further information is requested todo Goal for next major release
Projects
Development

No branches or pull requests

1 participant