Skip to content

Commit 61bcb90

Browse files
committed
fix: avoid dynamic import of lru-cache (resolves nuxt#481)
1 parent 754e39f commit 61bcb90

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { resolve } from 'upath'
22
import defu from 'defu'
33
import { parseURL, withLeadingSlash } from 'ufo'
4+
import LruCache from 'lru-cache'
45
import type { Module } from '@nuxt/types'
56
import { setupStaticGeneration } from './generate'
67
import { resolveProviders, detectProvider } from './provider'
@@ -87,7 +88,6 @@ const imageModule: Module<ModuleOptions> = async function imageModule (moduleOpt
8788
setupStaticGeneration(nuxt, options)
8889
})
8990

90-
const LruCache = await import('lru-cache').then(r => r.default || r)
9191
const cache = new LruCache()
9292
nuxt.hook('vue-renderer:context', (ssrContext: any) => {
9393
ssrContext.cache = cache

0 commit comments

Comments
 (0)