-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[now-build-utils] Allow prerender groups to be defined with an integer #3081
Conversation
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.
👍
Just for clarification purposes, the intended return document from a builder would look along these lines, correct? {
"output": {
"releases": {
"type": "prerender",
"expiration": 1,
"lambda": "[Lambda]",
"fallback": "[FileBlob | FileFsRef | FileRef]",
"group": 1
},
"_next/data/releases.json": {
"type": "prerender",
"expiration": 1,
"lambda": "[Lambda]",
"fallback": "[FileBlob | FileFsRef | FileRef]",
"group": 1
},
"community": {
"type": "prerender",
"expiration": 1,
"lambda": "[Lambda]",
"fallback": "[FileBlob | FileFsRef | FileRef]",
"group": 2
},
"_next/data/community.json": {
"type": "prerender",
"expiration": 1,
"lambda": "[Lambda]",
"fallback": "[FileBlob | FileFsRef | FileRef]",
"group": 2
}
}
} |
Correct @Timer 👍 |
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.
This looks workable to me, barring fixing the build (dangling PrerenderGroup reference).
As of #3081, we make it necessary to group `Prerenders` together for being invalidated at the same time. However, you might not want that. In turn, we'll make it optional.
#3081) This pull request removes the `PrerenderGroup` type in favor of a `group` parameter for the existing `Prerender` type. This parameter takes in an integer that defines a group of prerenders that should be invalidated at the same time: ``` interface Prerender { expiration: number; lambda: Lambda; fallback: FileBlob | FileFsRef | FileRef; group: number; } ``` **Example:** If two `Prerender` instances exist that have `group` set to `1`, they will both be invalidated at the same time.
As of #3081, we make it necessary to group `Prerenders` together for being invalidated at the same time. However, you might not want that. In turn, we'll make it optional.
This pull request removes the
PrerenderGroup
type in favor of agroup
parameter for the existingPrerender
type.This parameter takes in an integer that defines a group of prerenders that should be invalidated at the same time:
Example: If two
Prerender
instances exist that havegroup
set to1
, they will both be invalidated at the same time.