Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gatsby upgrade from v4 to v5 #535

Closed
wants to merge 7 commits into from
Closed

Conversation

Tammo-Feldmann
Copy link
Contributor

What I'm changing

On this branch I'm migrating from Gatsby version 4 to version 5. There were a few requirements that needed to change to make this transition possible. Node 18 and React 18 are the most notable prerequisites and I also updated all Gatsby plugins to their latests versions.
The reason to make this transition to Gatsby v5 is the new Slice API that Gatsby introduced specifically for faster build times in production. Since we have been seeing build time between 12min and 15min frequently, this could be a very useful initial step to speed up those build times.

How you can test it

This upgrade should not effect any existing features and all of our test should pass exactly the same as before. So, ideally we see no difference in the application behavior at all.

@Tammo-Feldmann
Copy link
Contributor Author

Tammo-Feldmann commented Jun 30, 2023

I was able to update all dependencies to work with Gatsby v5. In the process I discovered today that ReachUI has not upgraded to React v18. This is, however, a requirement for Gatsby v5. At this point it looks like we have three options a) leave this PR open and hope that Reach UI will upgrade to React v18 eventually b) make the necessary upgrades ourselves c) replace reach UI components with another library.

@Tammo-Feldmann
Copy link
Contributor Author

I discovered another thorny sticking point for us in trying to use the Gatsby Slice API to improve build time. The Gatsby docs explicitly state that their slice API does not support styled components and it looks like it might be a while before they do. Since we use styled components heavily in the CASEI code base, it's probably not an option for us to use the Gatsby Slice API. See docs and linked issue here.

@LanesGood
Copy link
Contributor

@willemarcel ok to close? Ref #675

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants