Skip to content

Commit be43418

Browse files
gatsbybotwardpeet
andauthored
fix(gatsby): Also clear cache on gatsby version change (#36913) (#36925)
Co-authored-by: Ward Peeters <ward@coding-tech.com>
1 parent 012761e commit be43418

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
@@ -332,6 +332,8 @@ export async function initialize({
332332
// The last, gatsby-node.js, is important as many gatsby sites put important
333333
// logic in there e.g. generating slugs for custom pages.
334334
const pluginVersions = flattenedPlugins.map(p => p.version)
335+
// we should include gatsby version as well
336+
pluginVersions.push(require(`../../package.json`).version)
335337
const optionalFiles = [
336338
`${program.directory}/gatsby-config.js`,
337339
`${program.directory}/gatsby-node.js`,

0 commit comments

Comments
 (0)