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 exclude regex array for generated pages #4754
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #4754 +/- ##
==========================================
+ Coverage 90.21% 90.21% +<.01%
==========================================
Files 67 67
Lines 2289 2290 +1
Branches 568 568
==========================================
+ Hits 2065 2066 +1
Misses 201 201
Partials 23 23
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. BTW do you mind adding a small test for it? @manniL
@pi0 That might be a bit problematic as I can only test that the file is not generated. I can't test if it can be correctly accessed through the Would that suffice? |
@manniL Seems OK 👍😊 |
This PR will add a property called
generate.exclude
. It accepts an array of regular expressions and will prevent generation of routes matching them. The routes will still be accessible whengenerate.fallback
is used.Use cases
/admin
in the Nuxt app that don't need to be generated upfront but still need to be accessiblegenerate
mode.Usage
Testing
Testing this feature is a bit tricky because we never test that the
generated
fallback actually loads the routes in SPA mode. We only test that it has been generated correctly here.Types of changes
Checklist: