Skip to content

Commit

Permalink
fix(gatsby): Also clear cache on gatsby version change (#36913)
Browse files Browse the repository at this point in the history
  • Loading branch information
wardpeet authored Oct 30, 2022
1 parent 0967446 commit 6b51a8e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/gatsby/src/services/initialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,8 @@ export async function initialize({
// The last, gatsby-node.js, is important as many gatsby sites put important
// logic in there e.g. generating slugs for custom pages.
const pluginVersions = flattenedPlugins.map(p => p.version)
// we should include gatsby version as well
pluginVersions.push(require(`../../package.json`).version)
const optionalFiles = [
`${program.directory}/gatsby-config.js`,
`${program.directory}/gatsby-node.js`,
Expand Down

0 comments on commit 6b51a8e

Please sign in to comment.