@@ -2,15 +2,15 @@ import { pathToFileURL } from 'node:url'
22import { join } from 'pathe'
33import { defu } from 'defu'
44import { isWindows } from 'std-env'
5- import { createResolver , addServerScanDir , logger , resolvePath } from '@nuxt/kit'
5+ import { addServerScanDir , logger } from '@nuxt/kit'
66import { logWhenReady } from '../features'
7+ import { resolve , resolvePath } from '../module'
78
89import type { Nuxt } from '@nuxt/schema'
910import type { Nitro , NitroOptions } from 'nitropack'
1011import type { HubConfig } from '../features'
1112
1213const log = logger . withTag ( 'nuxt:hub' )
13- const { resolve } = createResolver ( import . meta. url )
1414
1515export async function setupCache ( nuxt : Nuxt , hub : HubConfig ) {
1616 // Configure dev storage
@@ -21,7 +21,7 @@ export async function setupCache(nuxt: Nuxt, hub: HubConfig) {
2121 } )
2222
2323 // Add Server scanning
24- addServerScanDir ( resolve ( '../ runtime/cache/server' ) )
24+ addServerScanDir ( resolve ( 'runtime/cache/server' ) )
2525
2626 logWhenReady ( nuxt , `Application cache configured with \`${ nuxt . options . nitro . devStorage . cache . driver } \` driver` )
2727}
@@ -52,7 +52,7 @@ export async function setupProductionCache(nitro: Nitro, _hub: HubConfig) {
5252 case 'cloudflare-durable' :
5353 case 'cloudflare-pages' : {
5454 // TODO: cloudflare cache binding https://github.com/unjs/unstorage/pull/603
55- let driver = await resolvePath ( './ runtime/cache/cloudflare-driver' )
55+ let driver = await resolvePath ( 'runtime/cache/cloudflare-driver' )
5656 if ( isWindows ) {
5757 driver = pathToFileURL ( driver ) . href
5858 }
0 commit comments