mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-21 16:09:52 +00:00
fix(nuxt): use flat cache directory for prerender data
This commit is contained in:
parent
cd3cf0b41a
commit
47cdd7dd07
@ -2,8 +2,7 @@ import { defineDriver } from 'unstorage'
|
|||||||
import fsDriver from 'unstorage/drivers/fs-lite'
|
import fsDriver from 'unstorage/drivers/fs-lite'
|
||||||
import lruCache from 'unstorage/drivers/lru-cache'
|
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.replaceAll(':', '_')
|
||||||
const normalizeFsKey = (item: string) => item.indexOf(':') === -1 ? `${item}:index` : item
|
|
||||||
|
|
||||||
export default defineDriver((opts: { base: string }) => {
|
export default defineDriver((opts: { base: string }) => {
|
||||||
const fs = fsDriver({ base: opts.base })
|
const fs = fsDriver({ base: opts.base })
|
||||||
|
Loading…
Reference in New Issue
Block a user