Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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(vercel): ISR #9714
feat(vercel): ISR #9714
Changes from 5 commits
84683f2
85d0297
33df953
8d76309
8c4af72
3d9800d
cff749a
a34c215
469bf44
96be331
ab64e3d
280823a
3e87dbf
550538b
102fc1c
aa27e59
9b8f1af
eab740d
8954498
f51f9a8
44d4ced
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I don't understand this phrase. By default, what? It's not a boolean, so the default should be a number
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.
The default javascript value is false, but that just doesn't communicate anything.
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.
That's false because the parent object is optional, right? But if I pass an object, this field must have a default as stated in the docs. Which means I don't understand what's the default value in numbers of this option.
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.
Does this help?
prerender-config.json
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.
New lines 146-153.
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.
I would add a longer documentation here. From the implementation, I inferred that paths can be regex, but here I couldn't figure it out. I thought only strings were accepted.
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.
That is correct. Only strings are accepted. Vercel would interpret the string as a regex but that's a vercel implementation detail. I will look into adding a processing step so that they really only ever act like strings.
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.
Instead of a regex expression, should we be a little accurate here? Looks like if it's passed
['/foo']
, it could also match requests for/other/foo
.If we want to allow marking entire directories to exclude, maybe we can accept
(string | RegExp)[]
instead?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.
+1 from me too. Also, if a user passes a string, we should do an equality check, and not create a regex.
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.
I agree we should be stricter.
It's a RegExp here because that's how vercel processes the routes file.
I'll look into making the exclude paths behave as literal paths.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.