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

Ignore components by name #19

Closed
posva opened this issue Jul 5, 2022 · 1 comment
Closed

Ignore components by name #19

posva opened this issue Jul 5, 2022 · 1 comment

Comments

@posva
Copy link
Owner

posva commented Jul 5, 2022

It could be useful to ignore components given a pattern. e.g. src/routes/_not-a-page.vue, or .not-a-page or __not-a-page, etc but at the same time this can be achieved with the exclude option so is this really necessary?

Copy link
Owner Author

posva commented Jan 4, 2023

I think it's worth adding a default value to exclude and let users override this if necessary. As for the convention, a file or folder starting with _ seems like an easy choice since URL usually do not start with a _. It still requires the option to be overridden for edge cases:

exclude: [
  '**/_*', // files
  '**/_*/**, // folders
  '!_not-ignored',  // _not-ignored should still be handled
]

@posva posva closed this as completed in 17b79ec Feb 14, 2023
@posva posva moved this to 🏗 In progress in unplugin-vue-router Feb 14, 2023
@posva posva moved this from 🏗 In progress to ✅ Done in unplugin-vue-router Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

1 participant