Skip to content

Commit 6b51a8e

Browse files
authored
fix(gatsby): Also clear cache on gatsby version change (#36913)
1 parent 0967446 commit 6b51a8e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/gatsby/src/services/initialize.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,8 @@ export async function initialize({
320320
// The last, gatsby-node.js, is important as many gatsby sites put important
321321
// logic in there e.g. generating slugs for custom pages.
322322
const pluginVersions = flattenedPlugins.map(p => p.version)
323+
// we should include gatsby version as well
324+
pluginVersions.push(require(`../../package.json`).version)
323325
const optionalFiles = [
324326
`${program.directory}/gatsby-config.js`,
325327
`${program.directory}/gatsby-node.js`,

0 commit comments

Comments
 (0)