File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 11import { existsSync } from 'node:fs'
22import { mkdir , readFile , writeFile } from 'node:fs/promises'
3- import { dirname , join } from 'node:path'
3+ import { join } from 'node:path'
44
55import { glob } from 'fast-glob'
66import type { CacheHandlerValue } from 'next/dist/server/lib/incremental-cache/index.js'
@@ -29,7 +29,6 @@ const writeCacheEntry = async (
2929 value,
3030 } satisfies CacheHandlerValue )
3131
32- await mkdir ( dirname ( path ) , { recursive : true } )
3332 await writeFile ( path , entry , 'utf-8' )
3433}
3534
@@ -81,6 +80,8 @@ const buildFetchCacheValue = async (path: string): Promise<CachedFetchValue> =>
8180 */
8281export const copyPrerenderedContent = async ( ctx : PluginContext ) : Promise < void > => {
8382 try {
83+ // ensure the blob directory exists
84+ await mkdir ( ctx . blobDir , { recursive : true } )
8485 // read prerendered content and build JSON key/values for the blob store
8586 const manifest = await ctx . getPrerenderManifest ( )
8687
You can’t perform that action at this time.
0 commit comments