From 35c4a9392ffd48f5003555346fb0021ff349b298 Mon Sep 17 00:00:00 2001 From: Lennart Date: Tue, 15 Mar 2022 11:21:56 +0100 Subject: [PATCH] chore(docs): Clarify TS release doc (#35134) --- docs/docs/how-to/custom-configuration/typescript.md | 6 ++++-- docs/docs/reference/release-notes/v4.9/index.md | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/docs/how-to/custom-configuration/typescript.md b/docs/docs/how-to/custom-configuration/typescript.md index 3297312b76b5f..7005f3d11486b 100644 --- a/docs/docs/how-to/custom-configuration/typescript.md +++ b/docs/docs/how-to/custom-configuration/typescript.md @@ -273,9 +273,11 @@ Gatsby natively supports JavaScript and TypeScript, you can change files from `. - `gatsby-ssr.js` to `gatsby-ssr.tsx` - Address any of the [current limitations](#current-limitations) +If you've used other ways of using TypeScript in the past, you'll also want to read [migrating away from old workarounds](/docs/reference/release-notes/v4.9/#migrating-away-from-old-workarounds). + ## Current limitations -There are some limitations currently that you need to be aware of. We'll do our best to mitigate them in our code or through contributions to upstream dependencies. +There are some limitations currently that you need to be aware of. We'll do our best to mitigate them in our code, through contributions to upstream dependencies, and updates to our documentation. ### Parcel TypeScript features @@ -324,7 +326,7 @@ Progress on this is tracked in [Parcel #6925](https://github.com/parcel-bundler/ ### Other -- Workspaces (e.g. Yarn) are not supported yet. +- Workspaces (e.g. Yarn) are not supported. We'll add documentation on how to use this feature inside a workspace soon. - When changing `siteMetadata` in `gatsby-config` no hot-reloading will occur during `gatsby develop`. A restart is needed at the moment. ## Other Resources diff --git a/docs/docs/reference/release-notes/v4.9/index.md b/docs/docs/reference/release-notes/v4.9/index.md index ecf9dea3bf9b8..662aef7df260f 100644 --- a/docs/docs/reference/release-notes/v4.9/index.md +++ b/docs/docs/reference/release-notes/v4.9/index.md @@ -80,6 +80,12 @@ export const sourceNodes: GatsbyNode["sourceNodes"] = async ({ You can also check out the [using-typescript](https://github.com/gatsbyjs/gatsby/tree/master/examples/using-typescript) and [using-vanilla-extract](https://github.com/gatsbyjs/gatsby/tree/master/examples/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`](https://typestrong.org/ts-node/): By having both a `gatsby-config.js` and `gatsby-config.ts` (where `gatsby-config.js` registers `ts-node`) you were able to use TypeScript. You'll need to remove the `gatsby-config.js` file, `ts-node` dependency, and address any of the [current limitations](/docs/how-to/custom-configuration/typescript/#current-limitations). When both a `gatsby-config.js` and `gatsby-config.ts` exist the `.ts` file will now always take precedence. + ## Notable bugfixes & improvements - `gatsby`