v4.9 Release Notes
Welcome to gatsby@4.9.0
release (March 2022 #1)
Key highlights of this release:
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.
Support for TypeScript in gatsby-config
and gatsby-node
In the last release we added support for TypeScript in gatsby-browser
and gatsby-ssr
and as a follow-up we’re introducing a much requested feature: Support for TypeScript in gatsby-config
and gatsby-node
🎉
When you try it out in your project, please give us feedback in the accompanying RFC on what you like, what doesn’t work, and what you like to see in the future. Note: There are currently some limitations that you’ll need to be aware of. In the RFC you can also read why we chose Parcel for this feature and how we did it.
You can learn everything about this new feature on the TypeScript and Gatsby documentation page but here are two small examples of gatsby-config
and gatsby-node
with TypeScript:
You can also check out the using-typescript and using-vanilla-extract examples!
Migrating away from old workarounds
This list is probably incomplete. If you’ve used another workaround in the past, add it to this document by using the “Edit on GitHub” button at the bottom.
ts-node
: By having both agatsby-config.js
andgatsby-config.ts
(wheregatsby-config.js
registersts-node
) you were able to use TypeScript. You’ll need to remove thegatsby-config.js
file,ts-node
dependency, and address any of the current limitations. When both agatsby-config.js
andgatsby-config.ts
exist the.ts
file will now always take precedence.
Notable bugfixes & improvements
gatsby
Contributors
A big Thank You to our community who contributed to this release 💜
- 0xflotus
- jamatz: docs(gatsby): GatbsyImage -> GatsbyImage PR #34914
- brherr: Update gatsby-config.js PR #34924
- benackles: chore(docs): Update link to “How to create a Gatsby Starter” PR #34937