diff --git a/plugin/src/index.ts b/plugin/src/index.ts index 1a98d58e..9025a473 100644 --- a/plugin/src/index.ts +++ b/plugin/src/index.ts @@ -42,6 +42,10 @@ export async function onPreBuild({ await checkEnvironment({ utils }) } await restoreCache({ utils, publish: PUBLISH_DIR }) + const CACHE_DIR = normalizedCacheDir(PUBLISH_DIR) + + // Work around Gatsby bug https://github.com/gatsbyjs/gatsby/issues/33262 + await fs.ensureDir(join(CACHE_DIR, 'json')) checkGatsbyConfig({ utils, netlifyConfig }) }