Skip to content

Commit a3cd82c

Browse files
committed
fix(vercel): update image to images and add ttl
1 parent 4d8aab0 commit a3cd82c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/provider.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { normalize } from 'pathe'
22
import { defu } from 'defu'
33
import type { Nuxt } from '@nuxt/schema'
4+
import type { NitroOptions } from 'nitropack'
45
import { createResolver, resolvePath } from '@nuxt/kit'
56
import { hash } from 'ohash'
67
import type { InputProvider, ImageModuleProvider, ProviderSetup } from './types'
@@ -38,10 +39,11 @@ export const providerSetup: Record<string, ProviderSetup> = {
3839
// https://vercel.com/docs/more/adding-your-framework#images
3940
vercel (_providerOptions, moduleOptions, nuxt: Nuxt) {
4041
nuxt.options.nitro = defu(nuxt.options.nitro, {
41-
vercel: {
42+
vercel: <NitroOptions['vercel']>{
4243
config: {
43-
image: {
44+
images: {
4445
domains: moduleOptions.domains,
46+
minimumCacheTTL: 60 * 5,
4547
sizes: Array.from(new Set(Object.values(moduleOptions.screens || {})))
4648
}
4749
}

0 commit comments

Comments
 (0)