Skip to content

Commit

Permalink
fix(nuxt): use flat cache directory for prerender data
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Mar 8, 2024
1 parent cd3cf0b commit 47cdd7d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/nuxt/src/core/runtime/nitro/cache-driver.ts
Expand Up @@ -2,8 +2,7 @@ import { defineDriver } from 'unstorage'
import fsDriver from 'unstorage/drivers/fs-lite'
import lruCache from 'unstorage/drivers/lru-cache'

// Ensure we don't try to write/read from directory index for `/` paths
const normalizeFsKey = (item: string) => item.indexOf(':') === -1 ? `${item}:index` : item
const normalizeFsKey = (item: string) => item.replaceAll(':', '_')

export default defineDriver((opts: { base: string }) => {
const fs = fsDriver({ base: opts.base })
Expand Down

0 comments on commit 47cdd7d

Please sign in to comment.