hannoeru / vite-plugin-pages

File system based route generator for ⚡️Vite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feat] add `vueWithRouteBlock` predefined resolver

leo-buneev opened this issue · comments

Description

In our project we use file structure where pages and components are mixed together.

I would like to generate routes only for files that have <route></route> custom block defined. That removes ambiguity and makes automated logic pretty simple to understand.

Also, IMHO it provides nice migration path for big projects that want to use this plugin (first move route definitions into , then enable autodetection)

Do you think it will be useful to include? I can create PR.

Suggested solution

add new predefined resolver - vueWithRouteBlock, that will be based on vue resolver but even simpler.

Alternative

No response

Additional context

No response

Validations

  • Follow the Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
commented

Nice idea. This is what I need too.