Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Upgrade to Gatsby v3 #240

Merged
merged 17 commits into from
Jan 25, 2022
Merged

Upgrade to Gatsby v3 #240

merged 17 commits into from
Jan 25, 2022

Conversation

jgarrow
Copy link
Contributor

@jgarrow jgarrow commented Jan 20, 2022

This PR upgrades the themes to Gatsby v3, upgrading other dependencies where necessary to account for breaking changes from the version bump.

TO DO:

  • Fix enlarged header logo

 - gatsby-theme-apollo-core@3.0.38-alpha.0
 - gatsby-theme-apollo-docs@5.3.13-alpha.0
 - gatsby-theme-apollo@3.1.6-alpha.0
 - gatsby-theme-apollo-docs@5.3.13-alpha.1
Comment on lines +8 to +15
exports.onCreateWebpackConfig = ({actions}) => {
actions.setWebpackConfig({
resolve: {
alias: {path: require.resolve('path-browserify')}
}
});
};

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gatsby v3 moves from webpack 4 to 5. In webpack 5, you have to manually set polyfills that webpack 4 previously did for you.

Comment on lines +12 to +14
lessOptions: {
modifyVars: mapKeys(colors, (value, key) => `color-${key}`)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The update for this plugin moves options to more specific lessOptions and loaderOptions

Comment on lines 15 to +17
"@emotion/core": "^10.0.7",
"@emotion/styled": "^10.0.7",
"@svgr/webpack": "^4.2.0",
"gatsby-plugin-emotion": "^4.0.3",
"gatsby-plugin-less": "^3.0.1",
"gatsby-plugin-react-helmet": "^3.0.2",
"gatsby-plugin-svgr": "^2.0.1",
"@emotion/react": "^11.0.0",
"@emotion/styled": "^11.0.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The update for Emotion 11 and accompanying Gatsby plugin also require @emotion/styled. Not sure if we still need @emotion/core or if it's safe to remove.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update: the version of space-kit that we're using stil lrelies on @emotion/core, so I'm leaving it in

"gatsby-plugin-emotion": "^6.0.0",
"gatsby-plugin-less": "^5.0.0",
"gatsby-plugin-react-helmet": "^4.0.0",
"gatsby-plugin-svgr": "3.0.0-beta.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's an open PR to update this plugin to support Gatsby v3. Someone in the comments published a beta version in the interim until it gets merged.

 - gatsby-theme-apollo-docs@5.3.13-alpha.2
 - gatsby-theme-apollo-docs@5.3.13-alpha.3
 - gatsby-theme-apollo-docs@5.3.13-y.0
 - gatsby-theme-apollo-docs@5.3.13-y.1
 - gatsby-theme-apollo-docs@5.3.13-y.2
 - gatsby-theme-apollo-core@3.0.38-alpha.1
 - gatsby-theme-apollo-docs@5.3.13-y.3
@trevorblades
Copy link
Contributor

LGTM @jgarrow! 🥞

@jgarrow jgarrow marked this pull request as ready for review January 25, 2022 21:06
@jgarrow jgarrow merged commit e345a2d into main Jan 25, 2022
@jgarrow jgarrow deleted the jg/gatsby-v3 branch January 25, 2022 21:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants