From dda1a2645baed183321cd47316140cc6f169b79d Mon Sep 17 00:00:00 2001 From: Ty Hopp Date: Fri, 7 Jan 2022 18:42:37 +0800 Subject: [PATCH] chore(gatsby-plugin-create-client-paths): Update client paths plugin readme with migration info (#34423) --- .../gatsby-plugin-create-client-paths/README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/gatsby-plugin-create-client-paths/README.md b/packages/gatsby-plugin-create-client-paths/README.md index e0060aa0aed21..85a682367105a 100644 --- a/packages/gatsby-plugin-create-client-paths/README.md +++ b/packages/gatsby-plugin-create-client-paths/README.md @@ -1,11 +1,24 @@ # gatsby-plugin-create-client-paths -**Please Note:** With recent versions of Gatsby this plugin became obsolete. You should use the [File System Route API](https://www.gatsbyjs.com/docs/reference/routing/file-system-route-api/#creating-client-only-routes) to create client-only paths. +**Please Note:** With recent versions of Gatsby this plugin became obsolete. See [migration](#migration) notes below, or refer to the [File System Route API](https://www.gatsbyjs.com/docs/reference/routing/file-system-route-api/#creating-client-only-routes) documentation for details on how client only routes are now handled. Use this plugin to simplify creating a “hybrid” Gatsby app with both statically rendered pages as well as "client-paths". These paths exist on the client only and do not correspond to index.html files in an app's built assets. For more information refer to [client-only routes & user authentication](https://www.gatsbyjs.org/docs/client-only-routes-and-user-authentication/). +## Migration + +Extending from the use case below where the `gatsby-plugin-create-client-paths` plugin has a prefix of `/app/*`, the way you would do this with the [File System Route API](https://www.gatsbyjs.com/docs/reference/routing/file-system-route-api/#creating-client-only-routes) is by adopting this structure in your project: + +```text +|-- /src + |-- /pages + |-- /app + |-- [...].js +``` + +Additionally, you can also refer to the [client-only-paths](https://github.com/gatsbyjs/gatsby/tree/master/examples/client-only-paths) example. + ## Usage Install: