-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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: allow dsg/ssr renders without access to datastore if it's not required #38974
Changes from all commits
6ab2c54
477d8f7
2c56978
c4c7850
c9a5ef3
5afe5a5
4ad7ec5
d2676cc
a4c1ba5
7bb58c3
1807998
ed74e49
4263bcf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,9 @@ function maybeDropNamedPartOfWildcard( | |
return path.replace(/\*.+$/, `*`) | ||
} | ||
|
||
export function getRoutePathFromPage(page: IGatsbyPage): string { | ||
export function getRoutePathFromPage( | ||
page: Pick<IGatsbyPage, "path" | "matchPath"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this (and other places I applied After everything was narrowed down this allowed me to produce final subset of fields to be inlined in engine ( https://github.com/gatsbyjs/gatsby/pull/38974/files#diff-6e15aa2b28579972ae31b662310cd05809325fe178e51e48e4a89bbbc3b34134R45-R54 ) |
||
): string { | ||
return maybeDropNamedPartOfWildcard(page.matchPath) ?? page.path | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ function getCDNObfuscatedPath(path: string): string { | |
return `${store.getState().status.cdnObfuscatedPrefix}-${path}` | ||
} | ||
|
||
export const LmdbOnCdnPath = getCDNObfuscatedPath(`data.mdb`) | ||
export const getLmdbOnCdnPath = (): string => getCDNObfuscatedPath(`data.mdb`) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. making it lazy here, as that was causing a bug where generated path was different on each build while it should be the same to avoid publishing multiple versions of db to cdn |
||
|
||
export interface IPlatformAndArch { | ||
platform: string | ||
|
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.
moved engine bundling a bit later to a point where we know already which pages would actually be DSG or SSR (need to be after
preparePageTemplateConfigs
call)