File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
1
import { existsSync } from 'node:fs'
2
2
import { mkdir , readFile , writeFile } from 'node:fs/promises'
3
- import { dirname , join } from 'node:path'
3
+ import { join } from 'node:path'
4
4
5
5
import { glob } from 'fast-glob'
6
6
import type { CacheHandlerValue } from 'next/dist/server/lib/incremental-cache/index.js'
@@ -29,7 +29,6 @@ const writeCacheEntry = async (
29
29
value,
30
30
} satisfies CacheHandlerValue )
31
31
32
- await mkdir ( dirname ( path ) , { recursive : true } )
33
32
await writeFile ( path , entry , 'utf-8' )
34
33
}
35
34
@@ -81,6 +80,8 @@ const buildFetchCacheValue = async (path: string): Promise<CachedFetchValue> =>
81
80
*/
82
81
export const copyPrerenderedContent = async ( ctx : PluginContext ) : Promise < void > => {
83
82
try {
83
+ // ensure the blob directory exists
84
+ await mkdir ( ctx . blobDir , { recursive : true } )
84
85
// read prerendered content and build JSON key/values for the blob store
85
86
const manifest = await ctx . getPrerenderManifest ( )
86
87
You can’t perform that action at this time.
0 commit comments