![]() ![]() ![]() All packages we manage received a major version bump. Note that this only applies to plugins managed in the gatsbyjs/gatsby repository. You should upgrade any package name that starts with gatsby-*. Update your package.json to use the latest version for all Gatsby related packages. For example, the above command would be: Update Gatsby related packages Please note: If you use npm 7 or higher you’ll want to use the -legacy-peer-deps option when following the instructions in this guide. You need to update your package.json to use the latest version of react and react-dom. For example, the above command would be: Update React version You need to update your package.json to use the latest version of Gatsby. We recommend upgrading to Node 18 prior to updating your dependencies to ensure that the correct package contents are installed. ![]() Next, you need to update your dependencies. Follow instructions to fix those deprecations. You can run the npm outdated or yarn upgrade-interactive commands in your project to upgrade to the latest v4 release interactively.Īfter upgrading, run gatsby build and look for deprecation messages in the build log. Some changes required for Gatsby 5 can be applied incrementally to the latest v4, which should contribute to a smoother upgrade experience. Table of contentsīefore upgrading to v5 we highly recommend upgrading gatsby (and all plugins) to the latest v4 version. If you’re curious what’s new, head over to the v5.0 Release Notes.įor most users we expect a smooth upgrade path as only a couple of changes will be required: Updating to Node 18, switching to React 18, and changing GraphQL queries using a codemod. Slices unlock up to 90% reduction in build duration for content changes in highly shared components, Partial Hydration allows you to ship only the necessary JavaScript to the browser. Version 5 introduces the Slice API and Partial Hydration (Beta). This is a reference for upgrading your site from Gatsby 4 to Gatsby 5. Have you run into something that’s not covered here? Add your changes to GitHub! Introduction ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |