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(gatsby): DSG config for FS routes #33446

Closed
wants to merge 1 commit into from
Closed

feat(gatsby): DSG config for FS routes #33446

wants to merge 1 commit into from

Conversation

LekoArts
Copy link
Contributor

@LekoArts LekoArts commented Oct 6, 2021

Description

Enables DSG in File System Routes via:

export const config = () => {
  return {
     defer: true
  }
}

Documentation

We'll also need to update https://v4.gatsbyjs.com/docs/reference/rendering-options/deferred-static-generation/ and https://v4.gatsbyjs.com/docs/how-to/rendering-options/using-deferred-static-generation/

Related Issues

[ch38465]

@LekoArts LekoArts added topic: core Relates to Gatsby's core (e.g. page loading, reporter, state machine) gatsby 4 labels Oct 6, 2021
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Oct 6, 2021
@LekoArts LekoArts removed the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Oct 6, 2021
@herecydev
Copy link
Contributor

herecydev commented Oct 6, 2021

Will this also be the preferred mechanism for adding context into file system routing?

export const config = () => {
  return {
     defer: true,
     context: {
       foo: "bar"
     }
  }
}

@LekoArts
Copy link
Contributor Author

LekoArts commented Oct 6, 2021

Eventually, yes. But for this PR it's out of scope, focus here is DSG

@LekoArts
Copy link
Contributor Author

LekoArts commented Oct 6, 2021

We've hit some bigger obstacles for this (as we want to support e.g. context and GraphQL queries, too). So instead of doing a half-baked version we'll postpone this after Gatsby 4 GA and release this in a minor release in its complete state.

@LekoArts LekoArts closed this Oct 6, 2021
@LekoArts LekoArts deleted the fs-dsg branch October 6, 2021 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: core Relates to Gatsby's core (e.g. page loading, reporter, state machine)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants