Skip to content

Commit

Permalink
fix: don't force pg for vercel (#3093)
Browse files Browse the repository at this point in the history
  • Loading branch information
atinux authored Feb 5, 2025
1 parent 1cc9ca9 commit 0866008
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/presets/vercel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@ export default definePreset({
name: 'vercel',
async setupNitro(nitroConfig, options) {
if (nitroConfig.runtimeConfig?.content?.database?.type === 'sqlite') {
logger.warn('Deploying sqlite database to Vercel is not possible, switching to Postgres database with `POSTGRES_URL`.')
nitroConfig.runtimeConfig!.content!.database = {
type: 'postgres',
url: process.env.POSTGRES_URL,
}
logger.warn('Deploying sqlite database to Vercel is not recommended if you are not prerendering your site.')
logger.info('We recommend using a hosted SQL database like Neon, Turso, Supabase or others.')
}

await nodePreset.setupNitro(nitroConfig, options)
Expand Down

0 comments on commit 0866008

Please sign in to comment.