Skip to content

Commit

Permalink
fix: vercel provider improvements (#231)
Browse files Browse the repository at this point in the history
* fix: update auto-detection for vercel

https://vercel.com/docs/environment-variables#system-environment-variables

* fix: deduplicate vercel sizes list
  • Loading branch information
danielroe authored Apr 27, 2021
1 parent 5be72a5 commit 9561daf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const providerSetup: Record<string, ProviderSetup> = {
await mkdirp(dirname(imagesConfig))
await writeJson(imagesConfig, {
domains: moduleOptions.domains,
sizes: Object.values(moduleOptions.screens || {})
sizes: Array.from(new Set(Object.values(moduleOptions.screens || {})))
})
}
}
Expand Down Expand Up @@ -80,7 +80,7 @@ export function detectProvider (userInput?: string) {
return userInput
}

if (process.env.NOW_BUILDER) {
if (process.env.VERCEL) {
return 'vercel'
}

Expand Down

0 comments on commit 9561daf

Please sign in to comment.