Skip to content

Commit

Permalink
fix: type vercel nitro config correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed May 28, 2023
1 parent ad5757d commit 2679d60
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/provider.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { normalize } from 'pathe'
import { defu } from 'defu'
import type { Nuxt } from '@nuxt/schema'
import type { NitroOptions } from 'nitropack'
import type { NitroConfig } from 'nitropack'
import { createResolver, resolvePath } from '@nuxt/kit'
import { hash } from 'ohash'
import type { InputProvider, ImageModuleProvider, ProviderSetup } from './types'
Expand Down Expand Up @@ -41,15 +41,15 @@ export const providerSetup: Record<string, ProviderSetup> = {
// https://vercel.com/docs/more/adding-your-framework#images
vercel (_providerOptions, moduleOptions, nuxt: Nuxt) {
nuxt.options.nitro = defu(nuxt.options.nitro, {
vercel: <NitroOptions['vercel']>{
vercel: {
config: {
images: {
domains: moduleOptions.domains,
minimumCacheTTL: 60 * 5,
sizes: Array.from(new Set(Object.values(moduleOptions.screens || {})))
}
}
}
} satisfies NitroConfig['vercel']
})
}
}
Expand Down

0 comments on commit 2679d60

Please sign in to comment.