v4.18 Release Notes
email@example.com release (July 2022 #1)
Key highlights of this release:
typesOutputPathoption for GraphQL Typegen - Configure the location of the generated TypeScript types
- Server Side Rendering (SSR) in development - Find bugs & hydration errors more easily during
- Open RFCs - MDX v2 & Metadata management
Also check out notable bugfixes.
Bleeding Edge: Want to try new features as soon as possible? Install
gatsby@next and let us know if you have any issues.
typesOutputPath option for GraphQL Typegen
We saw great adoption of the GraphQL Typegen feature we’ve added in the 4.15 Release. We’ve heard that the location of the automatically generated TypeScript definitions file should be configurable. By default, it’s generated in the
You’re now able to specify the location of the generated types using the
typesOutputPath option. The
graphqlTypegen option accepts both a boolean and an object now. If you don’t pass an object (but
graphqlTypegen: true), the default value for each option will be used.
The path is relative to the site root, in the example above the file would be generated at
<root>/gatsby-types.d.ts. For more details and any future options, see the Gatsby Config API.
Server Side Rendering (SSR) in development
Shortly before v4 release, we disabled DEV_SSR flag because
getServerData was not properly handled. In this release, we handled
getServerData properly and restored the flag. Now you can add the
DEV_SSR flag to your
gatsby-config file so you can spot and fix SSR errors (like trying to access the window object) during development.
We continue to have ongoing RFCs that we’d like your input on. Please give it a read, if applicable a try, and leave feedback!
- Support for MDX v2: We are updating
gatsby-plugin-mdxto be compatible with MDX v2. Keep a look out in the discussion for a canary to try!
- Metadata Management API: We will be adding a built-in metadata management solution to Gatsby. Work is in progress and you can try out the canary now!
Notable bugfixes & improvements
NODE_ENVearlier to fix Jest failing with
Couldn't find temp query resulterror, via PR #35968
gatsby-source-wordpress: Always hydrate images and use the right parent element, via PR #36002
- Properly compile all packages for Node and browser environment, via PR #35948
lodashsize published packages, via PR #35947
A big Thank You to our community who contributed to this release 💜
- glitton: chore(docs): Remove trailing slashes section in creating-and-modifying-pages PR #35843
- rutterjt: chore(docs): fix query type name in Typegen guide PR #35961
- slaleye: chore(docs): Update copy in tutorial part 1 PR #35992
- cameronbraid: fix(gatsby): Partytown URI encoding of redirect parameters PR #35990
- axe312ger: chore(gatsby): Remove MDX