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

feat: add pagesDir glob #54

Merged
merged 8 commits into from
May 18, 2021
Merged

feat: add pagesDir glob #54

merged 8 commits into from
May 18, 2021

Conversation

klarkc
Copy link
Contributor

@klarkc klarkc commented May 17, 2021

With this, pagesDir can receive a glob string, so one can set multiple pages directories using globs instead of fixed arrays

@hannoeru
Copy link
Owner

Can you use resolveOptions() to resolve glob pages and merge it with existing options?

@jods4 jods4 mentioned this pull request May 18, 2021
@klarkc
Copy link
Contributor Author

klarkc commented May 18, 2021

Can you use resolveOptions() to resolve glob pages and merge it with existing options?

Can't because plugin initialization is sync, but I moved it to configResolved hook which is async

@hannoeru
Copy link
Owner

Thanks, that is great!

@hannoeru hannoeru merged commit c7ffa07 into hannoeru:main May 18, 2021
ckangwen pushed a commit to charrue/vite-plugin-pages that referenced this pull request Jan 24, 2023
* feat: add pagesDir glob support

* refact: move pageDir glob parsing to load handler

* doc: add a glob in spa example

* doc: fix glob example

* doc: update spa example to add route links

* refact: move pagesDirOptions glob parsing to configResolved hook

* test: remove context-wise snapshot test

* doc: improve getPageDirs doc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants